projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma]
/
lib
/
pleroma
/
web
/
push
/
subscription.ex
diff --git
a/lib/pleroma/web/push/subscription.ex
b/lib/pleroma/web/push/subscription.ex
index 5c448d6c9e2c3ef4247a144602fa9dfaf172f9c9..b99b0c5fb494279896e5061311739de4b5e17ab6 100644
(file)
--- a/
lib/pleroma/web/push/subscription.ex
+++ b/
lib/pleroma/web/push/subscription.ex
@@
-32,6
+32,14
@@
defmodule Pleroma.Web.Push.Subscription do
%{"alerts" => alerts}
end
%{"alerts" => alerts}
end
+ def enabled?(subscription, "follow_request") do
+ enabled?(subscription, "follow")
+ end
+
+ def enabled?(subscription, alert_type) do
+ get_in(subscription.data, ["alerts", alert_type])
+ end
+
def create(
%User{} = user,
%Token{} = token,
def create(
%User{} = user,
%Token{} = token,