projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b08baf9
)
SideEffects: Ensure a chat is present before streaming something out.
author
lain
<lain@soykaf.club>
Fri, 29 May 2020 14:05:02 +0000
(16:05 +0200)
committer
lain
<lain@soykaf.club>
Fri, 29 May 2020 14:05:02 +0000
(16:05 +0200)
lib/pleroma/web/activity_pub/side_effects.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/activity_pub/side_effects.ex
b/lib/pleroma/web/activity_pub/side_effects.ex
index a4de8691efff236415923a9de363e7120e3c1d51..02296b210562679f1dfb7e3c0c7065f67cfde9e3 100644
(file)
--- a/
lib/pleroma/web/activity_pub/side_effects.ex
+++ b/
lib/pleroma/web/activity_pub/side_effects.ex
@@
-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