notification: add non_follows/non_followers notification control settings

This commit is contained in:
William Pitcock 2019-05-25 05:19:47 +00:00
commit 4030837d91
2 changed files with 40 additions and 3 deletions

View file

@ -47,7 +47,14 @@ defmodule Pleroma.User.Info do
field(:emoji, {:array, :map}, default: [])
field(:notification_settings, :map,
default: %{"remote" => true, "local" => true, "followers" => true, "follows" => true}
default: %{
"remote" => true,
"local" => true,
"followers" => true,
"follows" => true,
"non_follows" => true,
"non_followers" => true
}
)
# Found in the wild
@ -71,7 +78,7 @@ defmodule Pleroma.User.Info do
notification_settings =
info.notification_settings
|> Map.merge(settings)
|> Map.take(["remote", "local", "followers", "follows"])
|> Map.take(["remote", "local", "followers", "follows", "non_follows", "non_followers"])
params = %{notification_settings: notification_settings}