From: William Pitcock Date: Mon, 18 Jun 2018 20:58:09 +0000 (+0000) Subject: streamer: use Object.normalize() instead of Object.get_by_ap_id() directly. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=fb04fecfb4791639369414a685be79bdd9d03309;p=akkoma streamer: use Object.normalize() instead of Object.get_by_ap_id() directly. --- diff --git a/lib/pleroma/web/streamer.ex b/lib/pleroma/web/streamer.ex index ce38f3cc3..c61bad830 100644 --- a/lib/pleroma/web/streamer.ex +++ b/lib/pleroma/web/streamer.ex @@ -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)})