From 1d9c886518ab389917ddf3f6c73daa31536d7fe9 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 5 Sep 2016 18:57:59 +0200 Subject: Adding enclosures to Atom and statuses JSON --- app/models/status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models') diff --git a/app/models/status.rb b/app/models/status.rb index 05ae1a06e..df9eceaff 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -18,7 +18,7 @@ class Status < ApplicationRecord validates :text, presence: true, if: Proc.new { |s| s.local? && !s.reblog? } scope :with_counters, -> { select('statuses.*, (select count(r.id) from statuses as r where r.reblog_of_id = statuses.id) as reblogs_count, (select count(f.id) from favourites as f where f.status_id = statuses.id) as favourites_count') } - scope :with_includes, -> { includes(:account, :mentions, :stream_entry, reblog: [:account, :mentions], thread: :account) } + scope :with_includes, -> { includes(:account, :mentions, :media_attachments, :stream_entry, reblog: [:account, :mentions], thread: :account) } def local? self.uri.nil? -- cgit