diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-12 19:09:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-12 19:09:21 +0200 |
commit | 5abdc77c8060a62ecf2259a1e9d63e862b9f7be7 (patch) | |
tree | 95b0a69d8943d6171ad19257af1655cd733fc245 /app/models/stream_entry.rb | |
parent | b5a9c6b3d292abc7e47d8a6f830f6b5589c04862 (diff) |
Add conversation model, <ostatus:conversation /> (#3016)
* Add <ostatus:conversation /> tag to Atom input/output Only uses ref attribute (not href) because href would be the alternate link that's always included also. Creates new conversation for every non-reply status. Carries over conversation for every reply. Keeps remote URIs verbatim, generates local URIs on the fly like the rest of them. * Fix conversation migration * More spec coverage for status before_create * Prevent n+1 query when generating Atom with the new conversations * Improve code style * Remove redundant local variable
Diffstat (limited to 'app/models/stream_entry.rb')
-rw-r--r-- | app/models/stream_entry.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/stream_entry.rb b/app/models/stream_entry.rb index d451e0dde..fb349f35c 100644 --- a/app/models/stream_entry.rb +++ b/app/models/stream_entry.rb @@ -22,7 +22,7 @@ class StreamEntry < ApplicationRecord validates :account, :activity, presence: true - STATUS_INCLUDES = [:account, :stream_entry, :media_attachments, :tags, mentions: :account, reblog: [:stream_entry, :account, :media_attachments, :tags, mentions: :account], thread: [:stream_entry, :account]].freeze + STATUS_INCLUDES = [:account, :stream_entry, :conversation, :media_attachments, :tags, mentions: :account, reblog: [:stream_entry, :account, :conversation, :media_attachments, :tags, mentions: :account], thread: [:stream_entry, :account]].freeze default_scope { where(activity_type: 'Status') } scope :with_includes, -> { includes(:account, status: STATUS_INCLUDES) } |