Commit f4af74b0 authored by Haelwenn's avatar Haelwenn
Browse files

Merge branch 'fix/streaming-api-for-create-activity' into 'develop'

fix: stream out Create Activity

Closes #2691

See merge request !3499
parents 901204df ee5def34
Pipeline #37040 passed with stages
in 78 minutes and 37 seconds
......@@ -10,7 +10,6 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
collection, and so on.
"""
alias Pleroma.Activity
alias Pleroma.Activity.Ir.Topics
alias Pleroma.Chat
alias Pleroma.Chat.MessageReference
alias Pleroma.FollowingRelationship
......@@ -226,6 +225,8 @@ def handle(%{data: %{"type" => "Create"}} = activity, meta) do
meta
|> add_notifications(notifications)
ap_streamer().stream_out(activity)
{:ok, activity, meta}
else
e -> Repo.rollback(e)
......@@ -246,9 +247,7 @@ def handle(%{data: %{"type" => "Announce"}} = object, meta) do
if !User.is_internal_user?(user) do
Notification.create_notifications(object)
object
|> Topics.get_activity_topics()
|> Streamer.stream(object)
ap_streamer().stream_out(object)
end
{:ok, object, meta}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment