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

Add instance to bluesky similar to mastodon #6

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

n0rthk1n9
Copy link
Contributor

Fixes #

Since bluesky is a decentralized network similar to mastodon, just based on another protocol called atproto, it should have the option to specify an instance like mastodon. Because my handle is n0rthk1n9 for example and my instance is the main one bsky.social. So currently you'd have to set the handle parameter to n0rthk1n9.bsky.social to make the created link working. For that reason I added a way to specify the instance to the Bluesky enum case.

@n0rthk1n9 n0rthk1n9 changed the title Add instance to bluesky similar to mastodon Draft: Add instance to bluesky similar to mastodon Dec 18, 2024
@n0rthk1n9 n0rthk1n9 changed the title Draft: Add instance to bluesky similar to mastodon Add instance to bluesky similar to mastodon Dec 18, 2024
@n0rthk1n9 n0rthk1n9 marked this pull request as draft December 18, 2024 07:49
@n0rthk1n9
Copy link
Contributor Author

Needs more work, just discovered, that if you have your own domain as a handle, you don't have an instance at the end of the profile link. So the instance needs to be optional. I'll test more and resubmit.

Copy link
Member

@Jeehut Jeehut left a comment

Choose a reason for hiding this comment

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

@n0rthk1n9 Thank you for addressing this.

I have 2 remarks on this PR in general you might want to think about:

  1. Having two enum cases named bluesky can be confusing for developers. Which one should they use? It's not clear what the differences are. If there are two bluesky cases, I feel like they should have a clear distinct name making their difference clear. And I didn't know Swift even allowed to cases with the same name. I just added a CI check on the main branch to check building state in the future (feel free rebase to main to see the CI check).

  2. I don't think you can directly compare Mastodon to Bluesky here. That's because for Mastodon, there is no single server a vast majority of users are on like with Bluesky. I'm not even sure if there are any custom Bluesky instances yet, but clearly there is a "default" instance and not only that, but I think 99% of Bluesky users are on that instance. So while I do understand that it should be possible to provide a custom instance, I'm not sure if there's a need for an extra instance parameter given that the current handle already needs to include the instance or the full domain. So at least at this point in time, I'm not sure if another bluesky enum case really makes anything simpler to use. What do you think?

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.

2 participants