relay: set invisible to true
authorAriadne Conill <ariadne@dereferenced.org>
Sat, 5 Oct 2019 20:06:31 +0000 (20:06 +0000)
committerAriadne Conill <ariadne@dereferenced.org>
Sat, 19 Oct 2019 23:21:37 +0000 (23:21 +0000)
lib/pleroma/web/activity_pub/relay.ex

index 03fc434a98119975fc01dc1b603fd1e29d1de739..de80612f172995285d7da651f40ecbf745bfa60a 100644 (file)
@@ -10,8 +10,12 @@ defmodule Pleroma.Web.ActivityPub.Relay do
   require Logger
 
   def get_actor do
-    "#{Pleroma.Web.Endpoint.url()}/relay"
-    |> User.get_or_create_service_actor_by_ap_id()
+    actor =
+      "#{Pleroma.Web.Endpoint.url()}/relay"
+      |> User.get_or_create_service_actor_by_ap_id()
+
+    {:ok, actor} = User.update_info(actor, &User.Info.set_invisible(&1, true))
+    actor
   end
 
   @spec follow(String.t()) :: {:ok, Activity.t()} | {:error, any()}