From 73b0af5c938b49ef0a4a21921b41a3b1bcd4e05e Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Sun, 16 Apr 2017 10:38:02 -0400 Subject: Simplify the og:image and og:description code in stream_entries/show (#1934) --- app/models/status.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models/status.rb') diff --git a/app/models/status.rb b/app/models/status.rb index 16cd4383f..c0a5d9d1b 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -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) -- cgit