Add instance to bluesky similar to mastodon#6
Add instance to bluesky similar to mastodon#6n0rthk1n9 wants to merge 1 commit intoFlineDev:mainfrom
Conversation
|
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. |
There was a problem hiding this comment.
@n0rthk1n9 Thank you for addressing this.
I have 2 remarks on this PR in general you might want to think about:
-
Having two enum cases named
blueskycan be confusing for developers. Which one should they use? It's not clear what the differences are. If there are twoblueskycases, 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 themainbranch to check building state in the future (feel free rebase tomainto see the CI check). -
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
instanceparameter 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 anotherblueskyenum case really makes anything simpler to use. What do you think?
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.