summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTusooa Zhu <tusooa@kazv.moe>2021-09-12 16:45:17 -0400
committerTusooa Zhu <tusooa@kazv.moe>2021-12-28 01:11:08 -0500
commite41eee5ed1c4e7001a28dababe046e28357d2ffd (patch)
tree86b7e9fb577952c38cb9e67f553cdcc8c01d1acd
parent1d8abf2511317927794c0c9f5f5c2a6efdb66fed (diff)
downloadpleroma-e41eee5ed1c4e7001a28dababe046e28357d2ffd.tar.gz
pleroma-e41eee5ed1c4e7001a28dababe046e28357d2ffd.zip
Make Move activity federate properly
Ref: emit-move
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex3
-rw-r--r--test/pleroma/web/activity_pub/activity_pub_test.exs5
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index 756096952..01dedd248 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -413,7 +413,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
"type" => "Move",
"actor" => origin.ap_id,
"object" => origin.ap_id,
- "target" => target.ap_id
+ "target" => target.ap_id,
+ "to" => [origin.follower_address]
}
with true <- origin.ap_id in target.also_known_as,
diff --git a/test/pleroma/web/activity_pub/activity_pub_test.exs b/test/pleroma/web/activity_pub/activity_pub_test.exs
index 574ef0d71..3021f2995 100644
--- a/test/pleroma/web/activity_pub/activity_pub_test.exs
+++ b/test/pleroma/web/activity_pub/activity_pub_test.exs
@@ -1739,9 +1739,12 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
"target" => ^new_ap_id,
"type" => "Move"
},
- local: true
+ local: true,
+ recipients: recipients
} = activity
+ assert old_user.follower_address in recipients
+
params = %{
"op" => "move_following",
"origin_id" => old_user.id,