Merge remote-tracking branch 'tootsuite/main' into custom/quote

# Conflicts:
#	app/controllers/api/v1/statuses_controller.rb
#	app/javascript/mastodon/actions/compose.js
#	app/javascript/mastodon/actions/notifications.js
#	app/javascript/mastodon/components/status_action_bar.js
#	app/javascript/mastodon/containers/status_container.js
#	app/javascript/mastodon/features/compose/containers/reply_indicator_container.js
#	app/javascript/mastodon/reducers/compose.js
This commit is contained in:
kyori19
2022-02-27 02:32:06 +00:00
587 changed files with 20748 additions and 8658 deletions

View File

@@ -113,7 +113,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
url: @status_parser.url || @status_parser.uri,
account: @account,
text: converted_object_type? ? converted_text : (@status_parser.text || ''),
language: @status_parser.language || detected_language,
language: @status_parser.language,
spoiler_text: converted_object_type? ? '' : (@status_parser.spoiler_text || ''),
created_at: @status_parser.created_at,
edited_at: @status_parser.edited_at,
@@ -372,10 +372,6 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
Formatter.instance.linkify([@status_parser.title.presence, @status_parser.spoiler_text.presence, @status_parser.url || @status_parser.uri].compact.join("\n\n"))
end
def detected_language
LanguageDetector.instance.detect(@status_parser.text, @account) if supported_object_type?
end
def unsupported_media_type?(mime_type)
mime_type.present? && !MediaAttachment.supported_mime_types.include?(mime_type)
end