mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 16:40:29 +00:00
SideEffects: Ensure a chat is present before streaming something out.
This commit is contained in:
parent
b08baf905b
commit
3898dd69a6
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,6 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
|
|||
|
||||
def handle_object_creation(%{"type" => "ChatMessage"} = object, meta) do
|
||||
with {:ok, object, meta} <- Pipeline.common_pipeline(object, meta) do
|
||||
Streamer.stream(["user", "user:pleroma_chat"], object)
|
||||
actor = User.get_cached_by_ap_id(object.data["actor"])
|
||||
recipient = User.get_cached_by_ap_id(hd(object.data["to"]))
|
||||
|
||||
|
@ -142,6 +141,7 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
|
|||
end
|
||||
end)
|
||||
|
||||
Streamer.stream(["user", "user:pleroma_chat"], object)
|
||||
{:ok, object, meta}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue