@ -365,6 +365,7 @@ class FeedManager
end
end
return true if check_for_blocks . any? { | target_account_id | crutches [ :blocking ] [ target_account_id ] || crutches [ :muting ] [ target_account_id ] }
return true if check_for_blocks . any? { | target_account_id | crutches [ :blocking ] [ target_account_id ] || crutches [ :muting ] [ target_account_id ] }
return true if crutches [ :blocked_by ] [ status . account_id ]
if status . reply? && ! status . in_reply_to_account_id . nil? # Filter out if it's a reply
if status . reply? && ! status . in_reply_to_account_id . nil? # Filter out if it's a reply
should_filter = ! crutches [ :following ] [ status . in_reply_to_account_id ] # and I'm not following the person it's a reply to
should_filter = ! crutches [ :following ] [ status . in_reply_to_account_id ] # and I'm not following the person it's a reply to
@ -548,7 +549,7 @@ class FeedManager
crutches [ :blocking ] = Block . where ( account_id : receiver_id , target_account_id : check_for_blocks ) . pluck ( :target_account_id ) . index_with ( true )
crutches [ :blocking ] = Block . where ( account_id : receiver_id , target_account_id : check_for_blocks ) . pluck ( :target_account_id ) . index_with ( true )
crutches [ :muting ] = Mute . where ( account_id : receiver_id , target_account_id : check_for_blocks ) . pluck ( :target_account_id ) . index_with ( true )
crutches [ :muting ] = Mute . where ( account_id : receiver_id , target_account_id : check_for_blocks ) . pluck ( :target_account_id ) . index_with ( true )
crutches [ :domain_blocking ] = AccountDomainBlock . where ( account_id : receiver_id , domain : statuses . flat_map { | s | [ s . account . domain , s . reblog & . account & . domain ] } . compact ) . pluck ( :domain ) . index_with ( true )
crutches [ :domain_blocking ] = AccountDomainBlock . where ( account_id : receiver_id , domain : statuses . flat_map { | s | [ s . account . domain , s . reblog & . account & . domain ] } . compact ) . pluck ( :domain ) . index_with ( true )
crutches [ :blocked_by ] = Block . where ( target_account_id : receiver_id , account_id : statuses . map { | s | s . reblog & . account_id } . compact ) . pluck ( :account_id ) . index_with ( true )
crutches [ :blocked_by ] = Block . where ( target_account_id : receiver_id , account_id : statuses . map { | s | [ s . account_id , s . reblog & . account_id ] } . flatten . compact ) . pluck ( :account_id ) . index_with ( true )
crutches
crutches
end
end