streamer: use Object.normalize() instead of Object.get_by_ap_id() directly.
This commit is contained in:
parent
47189531c5
commit
fb04fecfb4
@ -158,7 +158,7 @@ defmodule Pleroma.Web.Streamer do
|
|||||||
user = User.get_cached_by_ap_id(socket.assigns[:user].ap_id)
|
user = User.get_cached_by_ap_id(socket.assigns[:user].ap_id)
|
||||||
blocks = user.info["blocks"] || []
|
blocks = user.info["blocks"] || []
|
||||||
|
|
||||||
parent = Object.get_by_ap_id(item.data["object"])
|
parent = Object.normalize(item.data["object"])
|
||||||
|
|
||||||
unless is_nil(parent) or item.actor in blocks or parent.data["actor"] in blocks do
|
unless is_nil(parent) or item.actor in blocks or parent.data["actor"] in blocks do
|
||||||
send(socket.transport_pid, {:text, represent_update(item, user)})
|
send(socket.transport_pid, {:text, represent_update(item, user)})
|
||||||
|
Loading…
Reference in New Issue
Block a user