Skip to content

Add Bluesky Support #2394

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

Merged
merged 3 commits into from
Feb 3, 2025
Merged

Add Bluesky Support #2394

merged 3 commits into from
Feb 3, 2025

Conversation

ibnaleem
Copy link
Contributor

@ibnaleem ibnaleem commented Jan 20, 2025

I previously opened this PR (#2303) and @jasontenpenny gave me the suggestion of using Bluesky's API and checking against it's status_code:

I'm not sure this is going to work super well. If the user doesn't have a display name, I think the title of the page will match this even if the user exists. It might be better to use the status_code errorType and then specify the actual API call that looks up the user. That should respond with a 400 if the user doesn't exist. The API call would be https://public.api.bsky.app/xrpc/com.atproto.identity.resolveHandle?handle={}.bsky.social

Thank you for your suggestion, I have refactored the data.json to accommodate for this change. I implemented the urlProbe to the updated URL https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor={}.bsky.social and added 400 for the status_code. Now, if the user doesn't exist, the response will return a 400 status code, which allows us to handle the error appropriately.

This closes #2302.

Note: Previous PR (#2303) had unintended commits, hence this fresh PR.

@ibnaleem ibnaleem mentioned this pull request Jan 20, 2025
1 task
Copy link
Member

@ppfeister ppfeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as a note: Had to fix the file termination and removed the 400 --- just having status_code as the err type is good enough here

With that, it all LGTM! Appreciate the new target! Merging now.

@ppfeister ppfeister merged commit 072b581 into sherlock-project:master Feb 3, 2025
13 checks passed
@ibnaleem ibnaleem deleted the bluesky branch February 3, 2025 12:24
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.

Add Bluesky
2 participants