forked from AkkomaGang/akkoma
notification: remove local/remote match rules (too complicated)
This commit is contained in:
parent
5fbbc57c1b
commit
750ede5764
2 changed files with 1 additions and 10 deletions
|
@ -169,7 +169,6 @@ def skip?(activity, user) do
|
||||||
[
|
[
|
||||||
:self,
|
:self,
|
||||||
:blocked,
|
:blocked,
|
||||||
:local,
|
|
||||||
:muted,
|
:muted,
|
||||||
:followers,
|
:followers,
|
||||||
:follows,
|
:follows,
|
||||||
|
@ -189,12 +188,6 @@ def skip?(:blocked, activity, user) do
|
||||||
User.blocks?(user, %{ap_id: actor})
|
User.blocks?(user, %{ap_id: actor})
|
||||||
end
|
end
|
||||||
|
|
||||||
def skip?(:local, %{local: true}, %{info: %{notification_settings: %{"local" => false}}}),
|
|
||||||
do: true
|
|
||||||
|
|
||||||
def skip?(:local, %{local: false}, %{info: %{notification_settings: %{"remote" => false}}}),
|
|
||||||
do: true
|
|
||||||
|
|
||||||
def skip?(:muted, activity, user) do
|
def skip?(:muted, activity, user) do
|
||||||
actor = activity.data["actor"]
|
actor = activity.data["actor"]
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,6 @@ defmodule Pleroma.User.Info do
|
||||||
|
|
||||||
field(:notification_settings, :map,
|
field(:notification_settings, :map,
|
||||||
default: %{
|
default: %{
|
||||||
"remote" => true,
|
|
||||||
"local" => true,
|
|
||||||
"followers" => true,
|
"followers" => true,
|
||||||
"follows" => true,
|
"follows" => true,
|
||||||
"non_follows" => true,
|
"non_follows" => true,
|
||||||
|
@ -83,7 +81,7 @@ def update_notification_settings(info, settings) do
|
||||||
notification_settings =
|
notification_settings =
|
||||||
info.notification_settings
|
info.notification_settings
|
||||||
|> Map.merge(settings)
|
|> Map.merge(settings)
|
||||||
|> Map.take(["remote", "local", "followers", "follows", "non_follows", "non_followers"])
|
|> Map.take(["followers", "follows", "non_follows", "non_followers"])
|
||||||
|
|
||||||
params = %{notification_settings: notification_settings}
|
params = %{notification_settings: notification_settings}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue