diff options
author | rinpatch <rinpatch@sdf.org> | 2019-04-30 17:31:48 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-04-30 17:31:48 +0000 |
commit | 77690b9d03facf74483e3379f72b5b51c9f1bd4e (patch) | |
tree | 4a0ba8782a0048f322f5528d120b35588d4c1480 | |
parent | 32a4501d2d1cdfef68cbde236482e0c84cce3a7a (diff) | |
parent | ce4825c1dc8a2b7ec2712170f45cde0ae14b46cf (diff) | |
download | pleroma-77690b9d03facf74483e3379f72b5b51c9f1bd4e.tar.gz |
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
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 604ffae7b..483a2153f 100644 --- 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) |