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
This commit is contained in:
rinpatch 2019-04-30 17:31:48 +00:00
commit 77690b9d03
1 changed files with 2 additions and 1 deletions

View File

@ -168,7 +168,6 @@ def stream_out(activity) 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 @@ def stream_out(activity) 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)