commit: db88bf30d50a546114d3ee22a3c67b53975257d4
parent 07cb89823f2a33bc540fe53bd784e4b8e9197506
Author: Mark Felder <feld@feld.me>
Date: Sat, 8 Jun 2024 19:20:38 -0400
Add spec for send/1
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/pleroma/web/push.ex b/lib/pleroma/web/push.ex
@@ -25,6 +25,8 @@ defmodule Pleroma.Web.Push do
def enabled, do: match?([subject: _, public_key: _, private_key: _], vapid_config())
+ @spec send(Pleroma.Notification.t()) ::
+ {:ok, Oban.Job.t()} | {:error, Oban.Job.changeset() | term()}
def send(notification) do
WebPusherWorker.enqueue("web_push", %{"notification_id" => notification.id})
end