about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorErin <sylphofelectricity@gmail.com>2017-12-10 17:04:28 -0600
committerErin <sylphofelectricity@gmail.com>2017-12-10 17:04:28 -0600
commit08519cd4f4bd290e633d5243e8195111471b7bf0 (patch)
tree0e8539938894ac8280c0b005066f2e8e437c558c /app/models
parent434c70fd9855f55f6238cdd5a551f60c28572970 (diff)
status: stub local_only?, add scope, add marked_local_only?
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 294044139..40a8d05c8 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -75,6 +75,8 @@ class Status < ApplicationRecord
   scope :not_excluded_by_account, ->(account) { where.not(account_id: account.excluded_from_timeline_account_ids) }
   scope :not_domain_blocked_by_account, ->(account) { account.excluded_from_timeline_domains.blank? ? left_outer_joins(:account) : left_outer_joins(:account).where('accounts.domain IS NULL OR accounts.domain NOT IN (?)', account.excluded_from_timeline_domains) }
 
+  scope :not_local_only, -> { where(local_only: false) }
+
   cache_associated :account, :application, :media_attachments, :tags, :stream_entry, mentions: :account, reblog: [:account, :application, :stream_entry, :tags, :media_attachments, mentions: :account], thread: :account
 
   delegate :domain, to: :account, prefix: true
@@ -271,6 +273,10 @@ class Status < ApplicationRecord
   end
 
   def local_only?
+    local_only
+  end
+
+  def marked_local_only?
     # match both with and without U+FE0F (the emoji variation selector)
     /👁\ufe0f?\z/.match?(content)
   end