gotosocial
gotosocial copied to clipboard
[feature] Account `move` activity for instance migration
Mastodon allows an account to migrate from one instance to another, as documented here:
https://docs.joinmastodon.org/user/moving/#migration
Under the hood, this uses a combination of the activitypub move
activity, and the alsoKnownAs
field on profiles, as documented here:
https://docs.joinmastodon.org/spec/activitypub/#profile
It would be very cool if GoToSocial was able to support this as well, to allow accounts to move freely across instances with different AP implementations and features.
In order to do this, we need to first add alsoKnownAs
to the library that GoToSocial uses for federation: https://github.com/go-fed/activity -- using astool: https://github.com/go-fed/activity/tree/master/astool. Then, either we make a PR against that repo (preferred), or we fork the repo and use our own fork (much less preferred, and silly).
Once that's done, we need to implement some functionality in GtS for setting alsoKnownAs
-- probably through a PATCH to the /api/v1/accounts/update_credentials
path (https://github.com/superseriousbusiness/gotosocial/blob/main/internal/api/client/account/accountupdate.go). This PATCH would update this field in the account model: https://github.com/superseriousbusiness/gotosocial/blob/main/internal/gtsmodel/account.go#L112
Finally, we'd need to implement the move
activity in the federating database -- https://github.com/superseriousbusiness/gotosocial/tree/main/internal/federation/federatingdb -- and process side effects in the processor somewhere -- https://github.com/superseriousbusiness/gotosocial/blob/main/internal/processing/fromfederator.go
Hi, i want to migrate my acc to a gts instance, but i am currently blocked by the lack of alsoKnownAs
.
Am i correct to assume that one can look up the json-ld schema to feed into astool here?
https://github.com/w3c/activitystreams/commit/54a6723ed1c8b95a12997b4e73100308e267fc8f
Also, activity lib looks unmaintained atm.
I'd be very interesting in helping out with this!
I'd be very interesting in helping out with this!
Noted, thank you :) it'll be a while, bunch of other stuff to do first
@tsmethurst Saw you just assigned this one to yourself. Let me know if you need any help, happy to help however I can!
Thanks for the offer :) I'll be picking this up after our Christmas break (so, start of January).
Also, activity lib looks unmaintained atm.
@Houkime We maintain a fork here: https://github.com/superseriousbusiness/activity
Just created my gts instance so, I'll be testing the migration from my masondon instance as soon as it's ready.
Moving this back to the 0.15.0 milestone as there's quite a lot of complicated moving parts to get this right, and we decided we'd rather take plenty of time to ensure it works properly instead of putting it in a release too soon without sufficient testing. It's a v. high stakes feature, as a botched Move could mean that you lose your relationships with followers/following, so it's crucial we test this sufficiently, because we don't people to mess up their accounts. You'll have to hold your horses a little longer! :hand: :horse:
@tsmethurst Thanks for your care and thoughtfulness! Definitely a feature you want to get right. Appreciate all you do!
Thanks, that's sweet :)
Moving your account is now implemented on main. Currently only followers are moved, other things like following, blocks, etc, are not. We'll add some endpoints for import/export of such things as we go along. Once Move is in a release, I'll close this issue :)
These are great news 👏
~~I'm sorry if that has been already answered before, but does this include moving from GoToSocial (e.g. to Mastodon), or moving to GoToSocial (e.g. from Mastodon)? Maybe both?~~ As seen from pull requests - both 👍