You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a blog with ActivityPub enabled that exists since before blog profiles were a thing in this plugin. Once blog profiles were added, I switched the plugin settings to use a blog profile, started promoting it instead of the author profile, and deactivated the author profile in the plugin settings.
Now that this plugin supports moving accounts, I wanted to use the Move action in order to migrate the existing pending followers of my old profile account into the blog account. I did this using WP CLI and passing the account URLs for both the old and the new profile.
And I failed in the process. It seems that the migration has been made to the same account ID instead of the correct one:
I've checked the source code to try to understand why, and I think that there is a bug in the Move::internally function, but because I am not an expert in ActivityPub, I'm opening a discussion and not an issue because I cannot be 100% sure. It seems that this code is adding the alsoKnownAs identifier to the old account, given that $user is effectively the user object for the ID $from:
But I'm pretty sure this is not how the protocol works. After reading both the Mastodon and the GoToSocial docs, when you move an account from A to B, alsoKnownAs has to be set in the B profile (so, the new profile). The property to be set in account A (the old profile) is movedTo, which is correctly done in the next line for both cases of the if block.
Therefore, I think that for internal moves, a second call should be made to fetch the WordPress user behind the $to account (or ID=0 if $to is a blog profile), and then that's the account that should actually be tested in order to assign the alsoKnownAs property to it with the URL from $from.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a blog with ActivityPub enabled that exists since before blog profiles were a thing in this plugin. Once blog profiles were added, I switched the plugin settings to use a blog profile, started promoting it instead of the author profile, and deactivated the author profile in the plugin settings.
Now that this plugin supports moving accounts, I wanted to use the Move action in order to migrate the existing pending followers of my old profile account into the blog account. I did this using WP CLI and passing the account URLs for both the old and the new profile.
And I failed in the process. It seems that the migration has been made to the same account ID instead of the correct one:
I've checked the source code to try to understand why, and I think that there is a bug in the
Move::internally
function, but because I am not an expert in ActivityPub, I'm opening a discussion and not an issue because I cannot be 100% sure. It seems that this code is adding thealsoKnownAs
identifier to the old account, given that$user
is effectively the user object for the ID$from
:wordpress-activitypub/includes/class-move.php
Lines 135 to 149 in 19d0ea1
But I'm pretty sure this is not how the protocol works. After reading both the Mastodon and the GoToSocial docs, when you move an account from A to B,
alsoKnownAs
has to be set in the B profile (so, the new profile). The property to be set in account A (the old profile) ismovedTo
, which is correctly done in the next line for both cases of the if block.Therefore, I think that for internal moves, a second call should be made to fetch the WordPress user behind the
$to
account (or ID=0 if$to
is a blog profile), and then that's the account that should actually be tested in order to assign thealsoKnownAs
property to it with the URL from$from
.Beta Was this translation helpful? Give feedback.
All reactions