Hide the sender when privacy option is enabled
authorMark Felder <feld@FreeBSD.org>
Wed, 6 May 2020 21:42:27 +0000 (16:42 -0500)
committerMark Felder <feld@FreeBSD.org>
Wed, 6 May 2020 21:42:27 +0000 (16:42 -0500)
lib/pleroma/web/push/impl.ex
test/web/push/impl_test.exs

index 7f80bb0c92cb4d9aac11e0e9de066c38d5b83051..6917257022ee2752c4679b79d3e7dcfb372b212b 100644 (file)
@@ -108,11 +108,11 @@ defmodule Pleroma.Web.Push.Impl do
         %{
           user: %{notification_settings: %{privacy_option: true}}
         } = notification,
-        actor,
+        _actor,
         _object,
         mastodon_type
       ) do
-    %{title: format_title(notification, mastodon_type), body: "@#{actor.nickname}"}
+    %{body: format_title(notification, mastodon_type)}
   end
 
   def build_content(notification, actor, object, mastodon_type) do
index b2664bf288501f29ae5dc40226aaf5b05ff5c473..3de9118105651f9e69c2e765edb9545bb17d3fd9 100644 (file)
@@ -209,8 +209,7 @@ defmodule Pleroma.Web.Push.ImplTest do
       object = Object.normalize(activity)
 
       assert Impl.build_content(notif, actor, object) == %{
-               body: "@Bob",
-               title: "New Direct Message"
+               body: "New Direct Message"
              }
     end