streamer: use Object.normalize() instead of Object.get_by_ap_id() directly.
authorWilliam Pitcock <nenolod@dereferenced.org>
Mon, 18 Jun 2018 20:58:09 +0000 (20:58 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Wed, 27 Jun 2018 13:07:23 +0000 (13:07 +0000)
lib/pleroma/web/streamer.ex

index ce38f3cc3e1d97f219776df995d6cdc0972973c1..c61bad83029dc00a5bd682b2b262822593343202 100644 (file)
@@ -158,7 +158,7 @@ defmodule Pleroma.Web.Streamer do
       user = User.get_cached_by_ap_id(socket.assigns[:user].ap_id)
       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
         send(socket.transport_pid, {:text, represent_update(item, user)})