Use PleromaJobQueue in Pleroma.Web.Push
This commit is contained in:
parent
9c9eec62c2
commit
f1712cd2f1
6 changed files with 23 additions and 47 deletions
|
|
@ -19,8 +19,8 @@ defmodule Pleroma.Web.Push.Impl do
|
|||
@types ["Create", "Follow", "Announce", "Like"]
|
||||
|
||||
@doc "Performs sending notifications for user subscriptions"
|
||||
@spec perform_send(Notification.t()) :: list(any)
|
||||
def perform_send(
|
||||
@spec perform(Notification.t()) :: list(any) | :error
|
||||
def perform(
|
||||
%{activity: %{data: %{"type" => activity_type}, id: activity_id}, user_id: user_id} =
|
||||
notif
|
||||
)
|
||||
|
|
@ -50,7 +50,7 @@ defmodule Pleroma.Web.Push.Impl do
|
|||
end
|
||||
end
|
||||
|
||||
def perform_send(_) do
|
||||
def perform(_) do
|
||||
Logger.warn("Unknown notification type")
|
||||
:error
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue