notification: remove local/remote match rules (too complicated)
authorWilliam Pitcock <nenolod@dereferenced.org>
Sun, 26 May 2019 00:05:47 +0000 (00:05 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sun, 26 May 2019 00:05:47 +0000 (00:05 +0000)
lib/pleroma/notification.ex
lib/pleroma/user/info.ex

index 4095e04745684a81d096ed860d5eaeb1446539ab..35beffb87ed2d6e44b7eafa8b252cf4c9bcb2a7e 100644 (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"]
 
index b0bfdf4f4c0fbf70d253d680a561bded96997788..74573ba8340de32197505920e8f3b2df48e7a41c 100644 (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}