Adding enclosures to Atom and statuses JSON
This commit is contained in:
parent
eec0dc46a6
commit
1d9c886518
4 changed files with 19 additions and 1 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue