about summary refs log tree commit diff
path: root/app/lib/formatter.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-02-09 01:17:07 +0100
committerGitHub <noreply@github.com>2022-02-09 01:17:07 +0100
commitfd3a45e3482e86dad3c1dfc069144864c4ff0b0b (patch)
tree41d497599cf1ecb35f9f2e278b67c90e3a850a46 /app/lib/formatter.rb
parent2adcad04ff96fc8e7cb9aeefef1b22ea38e65457 (diff)
Add edit history to web UI (#17390)
* Add edit history to web UI

* Change history reducer to store items per status

* Fix missing loading prop
Diffstat (limited to 'app/lib/formatter.rb')
-rw-r--r--app/lib/formatter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb
index 1610f3689..6f02d669a 100644
--- a/app/lib/formatter.rb
+++ b/app/lib/formatter.rb
@@ -9,7 +9,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
@@ -30,7 +30,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