mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 10:09:02 +00:00
SideEffects: Ensure a chat is present before streaming something out.
This commit is contained in:
parent
b08baf905b
commit
3898dd69a6
|
@ -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