commit: 77690b9d03facf74483e3379f72b5b51c9f1bd4e
parent: 32a4501d2d1cdfef68cbde236482e0c84cce3a7a
Author: rinpatch <rinpatch@sdf.org>
Date: Tue, 30 Apr 2019 17:31:48 +0000
Merge branch 'fix/stream_out-normalize-only-creates' into 'develop'
Do not normalize objects in stream_out unless the activity type is Create
See merge request pleroma/pleroma!1109
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -168,7 +168,6 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
public = "https://www.w3.org/ns/activitystreams#Public"
if activity.data["type"] in ["Create", "Announce", "Delete"] do
- object = Object.normalize(activity)
Pleroma.Web.Streamer.stream("user", activity)
Pleroma.Web.Streamer.stream("list", activity)
@@ -180,6 +179,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
end
if activity.data["type"] in ["Create"] do
+ object = Object.normalize(activity)
+
object.data
|> Map.get("tag", [])
|> Enum.filter(fn tag -> is_bitstring(tag) end)