Merge branch 'fix/streaming-api-for-create-activity' into 'develop'
fix: stream out Create Activity Closes #2691 See merge request pleroma/pleroma!3499
This commit is contained in:
commit
f4af74b0fc
|
@ -10,7 +10,6 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
|
||||||
collection, and so on.
|
collection, and so on.
|
||||||
"""
|
"""
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.Activity.Ir.Topics
|
|
||||||
alias Pleroma.Chat
|
alias Pleroma.Chat
|
||||||
alias Pleroma.Chat.MessageReference
|
alias Pleroma.Chat.MessageReference
|
||||||
alias Pleroma.FollowingRelationship
|
alias Pleroma.FollowingRelationship
|
||||||
|
@ -226,6 +225,8 @@ def handle(%{data: %{"type" => "Create"}} = activity, meta) do
|
||||||
meta
|
meta
|
||||||
|> add_notifications(notifications)
|
|> add_notifications(notifications)
|
||||||
|
|
||||||
|
ap_streamer().stream_out(activity)
|
||||||
|
|
||||||
{:ok, activity, meta}
|
{:ok, activity, meta}
|
||||||
else
|
else
|
||||||
e -> Repo.rollback(e)
|
e -> Repo.rollback(e)
|
||||||
|
@ -246,9 +247,7 @@ def handle(%{data: %{"type" => "Announce"}} = object, meta) do
|
||||||
if !User.is_internal_user?(user) do
|
if !User.is_internal_user?(user) do
|
||||||
Notification.create_notifications(object)
|
Notification.create_notifications(object)
|
||||||
|
|
||||||
object
|
ap_streamer().stream_out(object)
|
||||||
|> Topics.get_activity_topics()
|
|
||||||
|> Streamer.stream(object)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
{:ok, object, meta}
|
{:ok, object, meta}
|
||||||
|
|
Loading…
Reference in New Issue