@ -73,6 +73,8 @@ class Status < ApplicationRecord
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
def reply?
! in_reply_to_id . nil? || attributes [ 'reply' ]
end
@ -288,7 +290,7 @@ class Status < ApplicationRecord
def filter_from_context? ( status , account )
should_filter = account & . blocking? ( status . account_id )
should_filter || = account & . domain_blocking? ( status . account . domain)
should_filter || = account & . domain_blocking? ( status . account_ domain )
should_filter || = account & . muting? ( status . account_id )
should_filter || = ( status . account . silenced? && ! account & . following? ( status . account_id ) )
should_filter || = ! StatusPolicy . new ( account , status ) . show?