X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fpush%2Fimpl.ex;h=8635731852b9921b61093d1b5c5e432af17d99fa;hb=e751f3ec56a1b05892cedefb88418ac3243bc99d;hp=4d65ca5d546a9803c78b97fde1b3e0b85eefbc32;hpb=600f428db4752114cff31283896d960299f80355;p=akkoma diff --git a/lib/pleroma/web/push/impl.ex b/lib/pleroma/web/push/impl.ex index 4d65ca5d5..863573185 100644 --- a/lib/pleroma/web/push/impl.ex +++ b/lib/pleroma/web/push/impl.ex @@ -5,13 +5,13 @@ defmodule Pleroma.Web.Push.Impl do @moduledoc "The module represents implementation push web notification" - alias Pleroma.Repo - alias Pleroma.User alias Pleroma.Activity + alias Pleroma.Notification alias Pleroma.Object - alias Pleroma.Web.Push.Subscription + alias Pleroma.Repo + alias Pleroma.User alias Pleroma.Web.Metadata.Utils - alias Pleroma.Notification + alias Pleroma.Web.Push.Subscription require Logger import Ecto.Query @@ -20,7 +20,10 @@ defmodule Pleroma.Web.Push.Impl do @doc "Performs sending notifications for user subscriptions" @spec perform_send(Notification.t()) :: list(any) - def perform_send(%{activity: %{data: %{"type" => activity_type}, id: activity_id}, user_id: user_id} = notif) + def perform_send( + %{activity: %{data: %{"type" => activity_type}, id: activity_id}, user_id: user_id} = + notif + ) when activity_type in @types do actor = User.get_cached_by_ap_id(notif.activity.data["actor"])