Browse Source

Make Move activity federate properly

Ref: emit-move
merge-requests/3524/head
Tusooa Zhu 2 years ago
parent
commit
7b6ed9bdf4
No known key found for this signature in database GPG Key ID: 7B467EDE43A08224
2 changed files with 6 additions and 2 deletions
  1. +2
    -1
      lib/pleroma/web/activity_pub/activity_pub.ex
  2. +4
    -1
      test/pleroma/web/activity_pub/activity_pub_test.exs

+ 2
- 1
lib/pleroma/web/activity_pub/activity_pub.ex View File

@@ -408,7 +408,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,


+ 4
- 1
test/pleroma/web/activity_pub/activity_pub_test.exs View File

@@ -1698,9 +1698,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,


Loading…
Cancel
Save