diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-10-28 12:47:23 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-11-28 22:08:30 +0300 |
commit | a52da55eb9c6bbf8a08bf1d90d59a48dc25f5907 (patch) | |
tree | 766d151dfa013931b636b723746061bbeb4f1429 /lib/pleroma/notification.ex | |
parent | ca1acfa314a57f78c2f5f8e60a4bd1380350e483 (diff) | |
download | pleroma-a52da55eb9c6bbf8a08bf1d90d59a48dc25f5907.tar.gz |
added User.NotificationSetting struct
Diffstat (limited to 'lib/pleroma/notification.ex')
-rw-r--r-- | lib/pleroma/notification.ex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index b7ecf51e4..acb635fdc 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -314,7 +314,7 @@ defmodule Pleroma.Notification do def skip?( :followers, activity, - %{notification_settings: %{"followers" => false}} = user + %{notification_settings: %{followers: false}} = user ) do actor = activity.data["actor"] follower = User.get_cached_by_ap_id(actor) @@ -324,14 +324,14 @@ defmodule Pleroma.Notification do def skip?( :non_followers, activity, - %{notification_settings: %{"non_followers" => false}} = user + %{notification_settings: %{non_followers: false}} = user ) do actor = activity.data["actor"] follower = User.get_cached_by_ap_id(actor) !User.following?(follower, user) end - def skip?(:follows, activity, %{notification_settings: %{"follows" => false}} = user) do + def skip?(:follows, activity, %{notification_settings: %{follows: false}} = user) do actor = activity.data["actor"] followed = User.get_cached_by_ap_id(actor) User.following?(user, followed) @@ -340,7 +340,7 @@ defmodule Pleroma.Notification do def skip?( :non_follows, activity, - %{notification_settings: %{"non_follows" => false}} = user + %{notification_settings: %{non_follows: false}} = user ) do actor = activity.data["actor"] followed = User.get_cached_by_ap_id(actor) |