0
0
Fork 0

Simplify the og:image and og:description code in stream_entries/show (#1934)

This commit is contained in:
Matt Jankowski 2017-04-16 10:38:02 -04:00 committed by Eugen
parent 7efde22c3a
commit 73b0af5c93
4 changed files with 16 additions and 11 deletions

View file

@ -110,6 +110,10 @@ class Status < ApplicationRecord
results
end
def non_sensitive_with_media?
!sensitive? && media_attachments.any?
end
class << self
def as_home_timeline(account)
where(account: [account] + account.following)