diff options
author | Maksim <parallel588@gmail.com> | 2019-06-16 10:33:25 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-06-16 10:33:25 +0000 |
commit | a04bf131e052f12c82e09b22c5e942e99c36d0ee (patch) | |
tree | 8573c525a0c2b2ddf3e6b49870cd413de81b51f0 /lib/pleroma/notification.ex | |
parent | 57d54a9f095774d856b7966c5fbc08c27fbdd586 (diff) | |
download | pleroma-a04bf131e052f12c82e09b22c5e942e99c36d0ee.tar.gz |
[#570] add user:notification stream
Diffstat (limited to 'lib/pleroma/notification.ex')
-rw-r--r-- | lib/pleroma/notification.ex | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index 46f2107b1..e25692006 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -13,6 +13,8 @@ defmodule Pleroma.Notification do alias Pleroma.User alias Pleroma.Web.CommonAPI alias Pleroma.Web.CommonAPI.Utils + alias Pleroma.Web.Push + alias Pleroma.Web.Streamer import Ecto.Query import Ecto.Changeset @@ -145,8 +147,9 @@ defmodule Pleroma.Notification do unless skip?(activity, user) do notification = %Notification{user_id: user.id, activity: activity} {:ok, notification} = Repo.insert(notification) - Pleroma.Web.Streamer.stream("user", notification) - Pleroma.Web.Push.send(notification) + Streamer.stream("user", notification) + Streamer.stream("user:notification", notification) + Push.send(notification) notification end end |