X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fstreamer.ex;h=5850a9579decd78bba61b9d92b0e43f01215d27a;hb=4b3c86c1a61a029202a262229c713cc3737b2a1b;hp=ad888c36151675111f4326e950fd91a19adf0a4c;hpb=9df4fa22dd3b0944f65327d312aa24db76fc74e8;p=akkoma diff --git a/lib/pleroma/web/streamer.ex b/lib/pleroma/web/streamer.ex index ad888c361..5850a9579 100644 --- a/lib/pleroma/web/streamer.ex +++ b/lib/pleroma/web/streamer.ex @@ -5,12 +5,13 @@ defmodule Pleroma.Web.Streamer do use GenServer require Logger - alias Pleroma.User - alias Pleroma.Notification alias Pleroma.Activity + alias Pleroma.Notification alias Pleroma.Object alias Pleroma.Repo + alias Pleroma.User alias Pleroma.Web.ActivityPub.Visibility + alias Pleroma.Web.MastodonAPI.NotificationView @keepalive_interval :timer.seconds(30) @@ -106,10 +107,10 @@ defmodule Pleroma.Web.Streamer do %{ event: "notification", payload: - Pleroma.Web.MastodonAPI.MastodonAPIController.render_notification( - socket.assigns["user"], - item - ) + NotificationView.render("show.json", %{ + notification: item, + for: socket.assigns["user"] + }) |> Jason.encode!() } |> Jason.encode!()