Add Bluesky support as an external media publisher (via AT Protocol) #2057
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bluesky is a microblogging social media service. This PR implements for Bluesky almost the same thing we had for Twitter back when Twitter was a thing: Posting about new submissions and publications.
The image shows there are no automatic embeds on Bluesky.
One big difference with Bluesky posts is how we have to handle things like links and embeds manually. This PR implements the handling of links, because otherwise this posting about submissions and publications would be somewhat useless.
However, I added no support for embeds, because those are a lot more difficult. As described in the website card embed docs we need to upload the image separately and link it with the title and description. This can be done at a later time.
For now, this PR should be sufficient.
The app settings need these fields in a
Bluesky
configuration block for this feature to work:Identifier
field is for the bluesky handle. This would look liketasvideos.bsky.social
, or if we already switched to a domain account it would betasvideos.org
.Password
field for the password. It should ideally be an App password, so it can easily be revoked if necessary!Oh and btw, Bluesky uses the usual access tokens and refresh tokens. However, this PR only ever uses access tokens once, and for the next post it simply create a completely new session with a new access token. This made more sense to me than keeping the refresh token alive, considering we only post like 2-3 times a day.