Merge branch 'main' into glitch-soc/merge-upstream

Conflicts:
- `app/views/settings/preferences/appearance/show.html.haml`:
  Upstream renamed some helper functions that were used in a part of the
  settings page which glitch-soc slightly changed the layout of.
  Ported the change.
This commit is contained in:
Claire
2022-02-09 17:28:33 +01:00
28 changed files with 645 additions and 141 deletions

View File

@@ -32,7 +32,7 @@ class Formatter
include ActionView::Helpers::TextHelper
def format(status, **options)
if status.reblog?
if status.respond_to?(:reblog?) && status.reblog?
prepend_reblog = status.reblog.account.acct
status = status.proper
else
@@ -53,7 +53,7 @@ class Formatter
return html.html_safe # rubocop:disable Rails/OutputSafety
end
linkable_accounts = status.active_mentions.map(&:account)
linkable_accounts = status.respond_to?(:active_mentions) ? status.active_mentions.map(&:account) : []
linkable_accounts << status.account
html = raw_content