diff options
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/fetch_link_card_service.rb | 2 | ||||
-rw-r--r-- | app/services/post_status_service.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index 86d0f9971..560a81768 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -40,7 +40,7 @@ class FetchLinkCardService < BaseService @card ||= PreviewCard.new(url: @url) failed = Request.new(:head, @url).perform do |res| - res.code != 405 && (res.code != 200 || res.mime_type != 'text/html') + res.code != 405 && res.code != 501 && (res.code != 200 || res.mime_type != 'text/html') end return if failed diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index b1d5bd3a7..6e982c7e6 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -28,7 +28,7 @@ class PostStatusService < BaseService status = account.statuses.create!(text: text, media_attachments: media || [], thread: in_reply_to, - sensitive: (options[:sensitive].nil? ? account.user&.setting_default_sensitive : options[:sensitive]), + sensitive: (options[:sensitive].nil? ? account.user&.setting_default_sensitive : options[:sensitive]) || options[:spoiler_text].present?, spoiler_text: options[:spoiler_text] || '', visibility: options[:visibility] || account.user&.setting_default_privacy, language: language_from_option(options[:language]) || LanguageDetector.instance.detect(text, account), |