Don't make relay announce notification
authorkPherox <admin@mail.kr-kp.com>
Tue, 26 May 2020 11:32:05 +0000 (11:32 +0000)
committerkPherox <admin@mail.kr-kp.com>
Fri, 29 May 2020 10:06:38 +0000 (19:06 +0900)
lib/pleroma/web/activity_pub/side_effects.ex

index 7eae0c52ccf906cff1b00ab6b14a0255e52f3d9c..60ab8733d4c9a0a602c85678d1ff1e9007c658d6 100644 (file)
@@ -11,6 +11,7 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
   alias Pleroma.Repo
   alias Pleroma.User
   alias Pleroma.Web.ActivityPub.ActivityPub
+  alias Pleroma.Web.ActivityPub.Relay
   alias Pleroma.Web.ActivityPub.Utils
 
   def handle(object, meta \\ [])
@@ -36,8 +37,10 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
 
     Utils.add_announce_to_object(object, announced_object)
 
-    Notification.create_notifications(object)
-    ActivityPub.stream_out(object)
+    if object.data["actor"] != Relay.relay_ap_id() do
+      Notification.create_notifications(object)
+      ActivityPub.stream_out(object)
+    end
 
     {:ok, object, meta}
   end