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
@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"])