Do not stream out poll replies

This commit is contained in:
rinpatch 2019-05-21 16:58:15 +03:00
parent d7c4d029c8
commit ee68244141
1 changed files with 28 additions and 26 deletions

View File

@ -192,6 +192,9 @@ 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)
# Do not stream out poll replies
unless object.data["name"] do
Pleroma.Web.Streamer.stream("user", activity)
Pleroma.Web.Streamer.stream("list", activity)
@ -203,8 +206,6 @@ 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)
@ -229,6 +230,7 @@ def stream_out(activity) do
end
end
end
end
def create(%{to: to, actor: actor, context: context, object: object} = params, fake \\ false) do
additional = params[:additional] || %{}