activitypub: always track following state for async reasons
authorWilliam Pitcock <nenolod@dereferenced.org>
Fri, 5 Oct 2018 23:31:00 +0000 (23:31 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Fri, 5 Oct 2018 23:31:00 +0000 (23:31 +0000)
lib/pleroma/web/activity_pub/utils.ex

index 0664b5a2ed4b6f9f48b7520027ab97a451c7dd42..43a1f432de4c7ad655122767093ae7a6f430de63 100644 (file)
@@ -247,11 +247,11 @@ defmodule Pleroma.Web.ActivityPub.Utils do
       "actor" => follower_id,
       "to" => [followed_id],
       "cc" => ["https://www.w3.org/ns/activitystreams#Public"],
-      "object" => followed_id
+      "object" => followed_id,
+      "state" => "pending"
     }
 
     data = if activity_id, do: Map.put(data, "id", activity_id), else: data
-    data = if User.locked?(followed), do: Map.put(data, "state", "pending"), else: data
 
     data
   end