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, 2 insertions, 6 deletions
diff --git a/app/models/stream_entry.rb b/app/models/stream_entry.rb
index bb68b1e14..8b41c8c39 100644
--- a/app/models/stream_entry.rb
+++ b/app/models/stream_entry.rb
@@ -6,17 +6,13 @@ class StreamEntry < ApplicationRecord
   belongs_to :account, inverse_of: :stream_entries
   belongs_to :activity, polymorphic: true
 
-  belongs_to :status,         foreign_type: 'Status',        foreign_key: 'activity_id'
-  belongs_to :follow,         foreign_type: 'Follow',        foreign_key: 'activity_id'
-  belongs_to :favourite,      foreign_type: 'Favourite',     foreign_key: 'activity_id'
-  belongs_to :block,          foreign_type: 'Block',         foreign_key: 'activity_id'
-  belongs_to :follow_request, foreign_type: 'FollowRequest', foreign_key: 'activity_id'
+  belongs_to :status, foreign_type: 'Status', foreign_key: 'activity_id', inverse_of: :stream_entry
 
   validates :account, :activity, presence: true
 
   STATUS_INCLUDES = [:account, :stream_entry, :media_attachments, :tags, mentions: :account, reblog: [:stream_entry, :account, mentions: :account], thread: [:stream_entry, :account]].freeze
 
-  scope :with_includes, -> { includes(:account, status: STATUS_INCLUDES, favourite: [:account, :stream_entry, status: STATUS_INCLUDES], follow: [:target_account, :stream_entry]) }
+  scope :with_includes, -> { includes(:account, status: STATUS_INCLUDES) }
 
   def object_type
     if orphaned?