about summary refs log tree commit diff
path: root/app/lib/formatter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/formatter.rb')
-rw-r--r--app/lib/formatter.rb18
1 files changed, 8 insertions, 10 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb
index 5559ddb73..6673f4b4b 100644
--- a/app/lib/formatter.rb
+++ b/app/lib/formatter.rb
@@ -32,15 +32,8 @@ class Formatter
   include ActionView::Helpers::TextHelper
 
   def format(status, **options)
-    if status.reblog?
-      prepend_reblog = status.reblog.account.acct
-      status         = status.proper
-    else
-      prepend_reblog = false
-    end
-
     summary = nil
-    raw_content = status.text
+    raw_content = status.proper.text
     summary_mode = false
 
     if status.title.present?
@@ -56,8 +49,13 @@ class Formatter
     return '' if raw_content.blank?
     return format_remote_content(raw_content, status.emojis, summary: summary, **options) unless status.local?
 
-    html = raw_content
-    html = "RT @#{prepend_reblog} #{html}" if prepend_reblog
+    if status.reblog?
+      html = "🔁 @#{status.reblog.account.acct}\n🔗 #{ActivityPub::TagManager.instance.url_for(status.reblog)}"
+      html += "\nℹ️ #{status.reblog.spoiler_text}" if status.reblog.spoiler_text.present?
+    else
+      html = raw_content
+    end
+
     html = "📄 #{html}" if summary_mode
     return html if options[:plaintext]