Browse Source

notification: remove local/remote match rules (too complicated)

tags/v1.1.4
William Pitcock 5 years ago
parent
commit
750ede5764
2 changed files with 1 additions and 10 deletions
  1. +0
    -7
      lib/pleroma/notification.ex
  2. +1
    -3
      lib/pleroma/user/info.ex

+ 0
- 7
lib/pleroma/notification.ex View File

@@ -169,7 +169,6 @@ defmodule Pleroma.Notification do
[
:self,
:blocked,
:local,
:muted,
:followers,
:follows,
@@ -189,12 +188,6 @@ defmodule Pleroma.Notification do
User.blocks?(user, %{ap_id: actor})
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
actor = activity.data["actor"]



+ 1
- 3
lib/pleroma/user/info.ex View File

@@ -48,8 +48,6 @@ defmodule Pleroma.User.Info do

field(:notification_settings, :map,
default: %{
"remote" => true,
"local" => true,
"followers" => true,
"follows" => true,
"non_follows" => true,
@@ -83,7 +81,7 @@ defmodule Pleroma.User.Info do
notification_settings =
info.notification_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}



Loading…
Cancel
Save