Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Account move activity for instance migration #130

Closed
tsmethurst opened this issue Aug 3, 2021 · 12 comments
Closed

[feature] Account move activity for instance migration #130

tsmethurst opened this issue Aug 3, 2021 · 12 comments
Assignees
Labels
enhancement New feature or request federation Issue relates to S2S/federation future tech Powerful technology to be added in the future.

Comments

@tsmethurst
Copy link
Contributor

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

@tsmethurst tsmethurst added enhancement New feature or request future tech Powerful technology to be added in the future. federation Issue relates to S2S/federation labels Aug 3, 2021
@tsmethurst tsmethurst changed the title Account move activity for instance migration [feature] Account move activity for instance migration Dec 20, 2021
@Houkime
Copy link

Houkime commented Nov 1, 2022

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?

w3c/activitystreams@54a6723

Also, activity lib looks unmaintained atm.

@natemoo-re
Copy link

I'd be very interesting in helping out with this!

@tsmethurst
Copy link
Contributor Author

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

@blakesmith
Copy link
Contributor

blakesmith commented Dec 17, 2023

@tsmethurst Saw you just assigned this one to yourself. Let me know if you need any help, happy to help however I can!

@tsmethurst
Copy link
Contributor Author

Thanks for the offer :) I'll be picking this up after our Christmas break (so, start of January).

@tsmethurst
Copy link
Contributor Author

Also, activity lib looks unmaintained atm.

@Houkime We maintain a fork here: https://github.com/superseriousbusiness/activity

@mkarliner
Copy link

Just created my gts instance so, I'll be testing the migration from my masondon instance as soon as it's ready.

@tsmethurst
Copy link
Contributor Author

tsmethurst commented Feb 17, 2024

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! ✋ 🐴

@blakesmith
Copy link
Contributor

@tsmethurst Thanks for your care and thoughtfulness! Definitely a feature you want to get right. Appreciate all you do!

@tsmethurst
Copy link
Contributor Author

Thanks, that's sweet :)

@tsmethurst
Copy link
Contributor Author

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 :)

@gytisrepecka
Copy link

gytisrepecka commented Mar 13, 2024

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 👍

@tsmethurst tsmethurst removed this from the v0.15.0 milestone Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request federation Issue relates to S2S/federation future tech Powerful technology to be added in the future.
Projects
None yet
Development

No branches or pull requests

6 participants