about summary refs log tree commit diff
path: root/app/models/stream_entry.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/stream_entry.rb')
-rw-r--r--app/models/stream_entry.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/stream_entry.rb b/app/models/stream_entry.rb
index f8272be17..f6c8f461b 100644
--- a/app/models/stream_entry.rb
+++ b/app/models/stream_entry.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 class StreamEntry < ApplicationRecord
   include Paginable
 
@@ -15,7 +17,11 @@ class StreamEntry < ApplicationRecord
   scope :with_includes, -> { includes(:account, status: STATUS_INCLUDES, favourite: [:account, :stream_entry, status: STATUS_INCLUDES], follow: [:target_account, :stream_entry]) }
 
   def object_type
-    orphaned? ? :activity : (targeted? ? :activity : activity.object_type)
+    if orphaned?
+      :activity
+    else
+      targeted? ? :activity : activity.object_type
+    end
   end
 
   def verb