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

Teach CandidateBot how to update Bluesky IDs #2435

Open
symroe opened this issue Sep 1, 2024 · 0 comments
Open

Teach CandidateBot how to update Bluesky IDs #2435

symroe opened this issue Sep 1, 2024 · 0 comments

Comments

@symroe
Copy link
Member

symroe commented Sep 1, 2024

Back when Twitter existed, we had a bot that would do a couple of things:

  1. For a 'vanity URL' https://twitter.com/DemocracyClub it would go and figure out the internal ID. e.g each Twitter user had an ID that related to their username. It would then store this ID on the PersonIdentifier's internal ID field
  2. From time to time, we would run a management command that would look up each internal ID and see if the username was the same. If not, it would update the vanity URL to match the current username.

This was important because candidates change their name based on the elections they're contesting. We might get one account that's Bob4MP, that then changes to BobOfBristol and then becomes Bob4Mayor.

Apparently, Bluesky has more or less the same system of internal IDs and editable usernames, so we should teach CandiateBot how to follow this pattern.

In code, this looks like:

  1. A helper that can look up users by username and user ID
  2. A management command that processes PersonIdentifiers
  3. Use the CandidateBot helper to make edits and store new versions.

Take a look at the Twitter command that did this for an idea of the pattern.

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

No branches or pull requests

1 participant