Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When creating status, if no sensitive status is given, use default #7057

Conversation

renatolond
Copy link
Contributor

Clients using the API that do not provide the sensitive flag are always posting with false sensitive option.

@@ -28,7 +28,7 @@ def call(account, text, in_reply_to = nil, **options)
status = account.statuses.create!(text: text,
media_attachments: media || [],
thread: in_reply_to,
sensitive: options[:sensitive],
sensitive: (options[:sensitive].nil? ? account.user&.setting_default_privacy : options[:sensitive]),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why setting_default_privacy? That has the values "public", "unlisted", "private", etc...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, distraction on my part, fixing

Clients using the API that do not provide the sensitive flag are always
posting with false sensitive option.
@renatolond renatolond force-pushed the bugfix/use_default_sensitive_option_when_creating_status branch from 90fe495 to 62ae1a6 Compare April 6, 2018 12:36
@renatolond
Copy link
Contributor Author

Updated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants