about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-04-16 10:38:02 -0400
committerEugen <eugen@zeonfederated.com>2017-04-16 16:38:02 +0200
commit73b0af5c938b49ef0a4a21921b41a3b1bcd4e05e (patch)
tree36c83c1be4c69738913bc7212baa7630fc5df471 /app/models
parent7efde22c3ab0464a0896abcaa8be277fd14bdee9 (diff)
Simplify the og:image and og:description code in stream_entries/show (#1934)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb4
1 files changed, 4 insertions, 0 deletions
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)