Hide local statuses from user atom and from unlogged users

This commit is contained in:
Renato "Lond" Cerqueira
2018-09-03 21:47:07 +02:00
parent 6bef1a8134
commit 469294d293
2 changed files with 7 additions and 2 deletions

View File

@ -26,6 +26,7 @@ class StreamEntry < ApplicationRecord
default_scope { where(activity_type: 'Status') }
scope :recent, -> { reorder(id: :desc) }
scope :with_includes, -> { includes(:account, status: STATUS_INCLUDES) }
scope :without_local_only, -> { where(statuses: { local_only: [false, nil] }) }
delegate :target, :title, :content, :thread, :local_only?,
to: :status,