relay: do not relay in test mode
authorWilliam Pitcock <nenolod@dereferenced.org>
Mon, 6 Aug 2018 08:35:56 +0000 (08:35 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Mon, 6 Aug 2018 08:35:56 +0000 (08:35 +0000)
lib/pleroma/web/federator/federator.ex

index 94e3979beb9ef17721575b5e3d19ee936665f012..078f3ec119baa2206c83d426e88b0fdb38225db8 100644 (file)
@@ -71,8 +71,10 @@ defmodule Pleroma.Web.Federator do
         Logger.info(fn -> "Sending #{activity.data["id"]} out via Salmon" end)
         Pleroma.Web.Salmon.publish(actor, activity)
 
-        Logger.info(fn -> "Relaying #{activity.data["id"]} out" end)
-        Pleroma.Web.ActivityPub.Relay.publish(activity)
+        if Mix.env() != :test do
+          Logger.info(fn -> "Relaying #{activity.data["id"]} out" end)
+          Pleroma.Web.ActivityPub.Relay.publish(activity)
+        end
       end
 
       Logger.info(fn -> "Sending #{activity.data["id"]} out via AP" end)