X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fnotification.ex;h=8012389ac3753d55b88307095c274f7bc1bdd297;hb=16edfef12e6781971e2056a80a0ac38dcc254b1b;hp=d7e23299223728325a9cd8d3911d138eb3ea46d0;hpb=c2b6c1b089a813cf8c7cbd54c0f80bee4985522c;p=akkoma diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index d7e232992..8012389ac 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -116,7 +116,8 @@ defmodule Pleroma.Notification do {_, notification_ids} = Repo.update_all(query, []) - from(n in Notification, where: n.id in ^notification_ids) + Notification + |> where([n], n.id in ^notification_ids) |> join(:inner, [n], activity in assoc(n, :activity)) |> join(:left, [n, a], object in Object, on: @@ -209,8 +210,10 @@ defmodule Pleroma.Notification do unless skip?(activity, user) do notification = %Notification{user_id: user.id, activity: activity} {:ok, notification} = Repo.insert(notification) - Streamer.stream("user", notification) - Streamer.stream("user:notification", notification) + + ["user", "user:notification"] + |> Streamer.stream(notification) + Push.send(notification) notification end