Add spec for send/1

This commit is contained in:
Mark Felder 2024-06-08 19:20:38 -04:00
parent 07cb89823f
commit db88bf30d5

View File

@ -25,6 +25,8 @@ defmodule Pleroma.Web.Push do
def enabled, do: match?([subject: _, public_key: _, private_key: _], vapid_config()) 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 def send(notification) do
WebPusherWorker.enqueue("web_push", %{"notification_id" => notification.id}) WebPusherWorker.enqueue("web_push", %{"notification_id" => notification.id})
end end