streamer: worker: actually use should_send? consistently
This commit is contained in:
parent
5a0c018d2a
commit
d1d058bf85
|
@ -201,11 +201,8 @@ def push_to_socket(topics, topic, item) do
|
||||||
# Get the current user so we have up-to-date blocks etc.
|
# Get the current user so we have up-to-date blocks etc.
|
||||||
if socket_user do
|
if socket_user do
|
||||||
user = User.get_cached_by_ap_id(socket_user.ap_id)
|
user = User.get_cached_by_ap_id(socket_user.ap_id)
|
||||||
blocks = user.info.blocks || []
|
|
||||||
mutes = user.info.mutes || []
|
|
||||||
|
|
||||||
with true <- Enum.all?([blocks, mutes], &(item.actor not in &1)),
|
if should_send?(user, item) do
|
||||||
true <- thread_containment(item, user) do
|
|
||||||
send(transport_pid, {:text, StreamerView.render("update.json", item, user)})
|
send(transport_pid, {:text, StreamerView.render("update.json", item, user)})
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue