Separate Subscription Notifications from regular Notifications
This commit is contained in:
parent
53a3ad6043
commit
0bd2b85edb
14 changed files with 670 additions and 12 deletions
|
|
@ -9,6 +9,7 @@ defmodule Pleroma.Web.Push.Impl do
|
|||
alias Pleroma.Notification
|
||||
alias Pleroma.Object
|
||||
alias Pleroma.Repo
|
||||
alias Pleroma.SubscriptionNotification
|
||||
alias Pleroma.User
|
||||
alias Pleroma.Web.Metadata.Utils
|
||||
alias Pleroma.Web.Push.Subscription
|
||||
|
|
@ -19,7 +20,7 @@ defmodule Pleroma.Web.Push.Impl do
|
|||
@types ["Create", "Follow", "Announce", "Like"]
|
||||
|
||||
@doc "Performs sending notifications for user subscriptions"
|
||||
@spec perform(Notification.t()) :: list(any) | :error
|
||||
@spec perform(Notification.t() | SubscriptionNotification.t()) :: list(any) | :error
|
||||
def perform(
|
||||
%{
|
||||
activity: %{data: %{"type" => activity_type}, id: activity_id} = activity,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue