mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-25 01:24:02 -05:00
Remove duplicate code for handling muted users
The mute check was indeed streamlined in f62539ce5c
and we somehow kept some of the old code when merging.
This commit is contained in:
parent
c18d55e8c2
commit
c699b2d141
@ -155,12 +155,6 @@ class FeedManager
|
|||||||
return true if status.reply? && (status.in_reply_to_id.nil? || status.in_reply_to_account_id.nil?)
|
return true if status.reply? && (status.in_reply_to_id.nil? || status.in_reply_to_account_id.nil?)
|
||||||
return true if keyword_filter_from_home?(status, receiver_id)
|
return true if keyword_filter_from_home?(status, receiver_id)
|
||||||
|
|
||||||
check_for_mutes = [status.account_id]
|
|
||||||
check_for_mutes.concat(status.mentions.pluck(:account_id))
|
|
||||||
check_for_mutes.concat([status.reblog.account_id]) if status.reblog?
|
|
||||||
|
|
||||||
return true if Mute.where(account_id: receiver_id, target_account_id: check_for_mutes).any?
|
|
||||||
|
|
||||||
check_for_blocks = status.mentions.pluck(:account_id)
|
check_for_blocks = status.mentions.pluck(:account_id)
|
||||||
check_for_blocks.concat([status.account_id])
|
check_for_blocks.concat([status.account_id])
|
||||||
check_for_blocks.concat([status.reblog.account_id]) if status.reblog?
|
check_for_blocks.concat([status.reblog.account_id]) if status.reblog?
|
||||||
|
Loading…
Reference in New Issue
Block a user