projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'support/tests' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
push
/
push.ex
diff --git
a/lib/pleroma/web/push/push.ex
b/lib/pleroma/web/push/push.ex
index 4973b529ceec978a4fcd489a20155c00e100ca71..7ef1532acae45a6add18bbf9820229623d33bb0f 100644
(file)
--- a/
lib/pleroma/web/push/push.ex
+++ b/
lib/pleroma/web/push/push.ex
@@
-3,13
+3,10
@@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Push do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Push do
- alias Pleroma.Repo
alias Pleroma.Workers.WebPusherWorker
require Logger
alias Pleroma.Workers.WebPusherWorker
require Logger
- import Pleroma.Workers.WorkerHelper, only: [worker_args: 1]
-
def init do
unless enabled() do
Logger.warn("""
def init do
unless enabled() do
Logger.warn("""
@@
-35,8
+32,6
@@
defmodule Pleroma.Web.Push do
end
def send(notification) do
end
def send(notification) do
- %{"op" => "web_push", "notification_id" => notification.id}
- |> WebPusherWorker.new(worker_args(:web_push))
- |> Repo.insert()
+ WebPusherWorker.enqueue("web_push", %{"notification_id" => notification.id})
end
end
end
end