refactor filtering mechanism
This commit is contained in:
parent
aa71139e4a
commit
15b21d1983
3 changed files with 17 additions and 8 deletions
|
|
@ -200,10 +200,12 @@ defmodule Pleroma.Web.Streamer do
|
|||
user = User.get_cached_by_ap_id(socket.assigns[:user].ap_id)
|
||||
blocks = user.info.blocks || []
|
||||
mutes = user.info.mutes || []
|
||||
reblog_mutes = user.info.reblog_mutes || []
|
||||
|
||||
parent = Object.normalize(item.data["object"])
|
||||
|
||||
unless is_nil(parent) or item.actor in blocks or item.actor in mutes or
|
||||
item.actor in reblog_mutes or
|
||||
not ActivityPub.contain_activity(item, user) or parent.data["actor"] in blocks or
|
||||
parent.data["actor"] in mutes do
|
||||
send(socket.transport_pid, {:text, represent_update(item, user)})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue