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

refactor Move for more redundancy #3360

Merged
merged 3 commits into from Apr 24, 2024
Merged

Conversation

hughrun
Copy link
Contributor

@hughrun hughrun commented Apr 22, 2024

As outlined in #3354, a use Move fails if the user is moving from a BookWyrm server to another BookWrym server. This is because:

  1. the original code did not announce changes to alsoKnownAs;
  2. the original code always checked the locally saved profile rather than refetching the remote data;

This PR fixes both these problems by forcing MoveUser to always perform a "refresh" of the local data from the remote, and by saving the user with broadcast=True when updating alsoKnownAs ids.

It also adds some tests, which might have (or might not have, depending how they were written) caught this issues if I'd included some originally!

Fixes #3354

hughrun and others added 3 commits April 22, 2024 13:35
As outlined in bookwyrm-social#3354, a use `Move` fails if the user is moving from a BookWyrm server to another BookWrym server.
This is because:

1. the original code did not announce changes to alsoKnownAs;
2. the original code always checked the locally saved profile rather than refetching the remote data;

This commit fixes both these problems by forcing `MoveUser` to always perform a "refresh" of the local data from the remote, and by saving the user with broadcast=True when updating alsoKnownAs ids.
@Minnozz Minnozz merged commit 3d183a3 into bookwyrm-social:main Apr 24, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moving account between instances
2 participants