aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/activity_pub
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/activity_pub')
-rw-r--r--lib/pleroma/web/activity_pub/side_effects.ex6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/pleroma/web/activity_pub/side_effects.ex b/lib/pleroma/web/activity_pub/side_effects.ex
index 39d37fbcb..774c4abb1 100644
--- a/lib/pleroma/web/activity_pub/side_effects.ex
+++ b/lib/pleroma/web/activity_pub/side_effects.ex
@@ -518,6 +518,12 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
Keyword.get(meta, :streamables, [])
|> Enum.each(fn {topics, items} ->
Streamer.stream(topics, items)
+
+ # Tell the matrix controller that a new message is there so it can
+ # start fetching.
+ with {%User{id: user_id}, %MessageReference{}} <- items do
+ Phoenix.PubSub.broadcast(:matrix, "user:#{user_id}", :chat)
+ end
end)
meta