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 code for normalizing IDs #1389

Open
snarfed opened this issue Oct 17, 2024 · 0 comments
Open

Refactor code for normalizing IDs #1389

snarfed opened this issue Oct 17, 2024 · 0 comments
Labels

Comments

@snarfed
Copy link
Owner

snarfed commented Oct 17, 2024

...ie converting them to the canonical representation for their protocol. http://user.com/ => user.com for web, http://instance/@user => http://instance/users/user for fediverse, https://bsky.app/profile/user => did:plc:abc for ATProto, etc.

We currently do this in ids.translate_* and ids.normalize_user_id, and a bit ad hoc elsewhere too, and we use it in Object.normalize_ids, but it's not very clean, it causes circular imports in ids, and it's not easily reusable enough elsewhere, eg for #1172.

Made a lot of progress on this in a stash, but there's still a lot of work left to do.

@snarfed snarfed added the infra label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant