-
Notifications
You must be signed in to change notification settings - Fork 57
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
Bluesky: publishing #1580
Comments
Trying to work out how to actually turn this on. Setting |
Yes! Line 73 in 87038d3
More: Lines 525 to 535 in 87038d3
Btw backfeed seems pretty stable, congrats again! I'm ready to announce it if you are. Want to do the honors? |
Great, thanks, I'll have a go at this :)
Sure! Will write that soon- prob not today as I'm a bit under the weather but in the next few days for sure |
Found some energy from somewhere! Hope this is OK. https://www.joelotter.com/posts/2023/10/bridgy-bluesky/ |
Random note: Bluesky still doesn't have proper embed support, and bsky.link appears to be dead, so I'm skipping post embeds in reply previews. |
Bluesky has link cards (previews0, which unlike on other networks are optional and it's up to the user which link in a post becomes the link card. I propose that to start with we just handle the last link in a post as the card, as that feels like the most common usage. Later, we might want it to be adjustable using some specific bridgy property. What do you think? |
Though interestingly Mastodon does actually choose the first link. I still think last is the more desired behaviour... |
Last link sounds good! Or even skip embeds altogether to start. I'm all for starting with the simplest thing that works end to end, then expanding. |
Think I've got preview pretty much working for the basic feature set. I'm a bit confused how to actually do stuff against Bluesky though. Do I need to write raw ATproto repo-write queries? Does lexrpc include a way to do this? Had a look at how bridgy-fed does it and it seems very low-level! |
Hah, yes! I think you just call |
Hmm I'm not sure what I need to add in terms of the endpoint handling for e.g. |
That is totally true. 😕 I had the same problem when I added delete for Bluesky a bit ago, maybe follow the way that works? |
So I'm still mildly baffled by the flow here but I think what I'm missing is functionality for the OAuth Dropins Bluesky Callback's |
Sounds right, but you can probably get much of it for free, let me come back when I have a bit more time to sketch something. Btw feel free to skip interactive publish/preview entirely for now if you want, I'm happy to ship just webmention-based publish, and then add on interactive afterward! |
Oh, I didn't clock that those were separate flows. |
Sorry the auth stuff is so difficult btw! Obviously the non-OAuth part here is awkward, but also the auth code on the Bridgy side in general is probably over-abstracted. |
Random discovery is that Bluesky (presumably intentionally given a repo is supposed to be user-owned?) does not validate dates. We can publish posts at the time the source was written. https://bsky.app/profile/joelotter.com/post/3kefvqwq6g424 |
(I published that post with Bridgy!) |
Awesome! Congrats! And yeah people like @DavidBuchanan314 have been all over that. The team says |
Am I right in thinking lexrpc doesn't currently support non-JSON request bodies? |
Alright, I've got it uploading images! The next thing is facets for links and mentions. I can see that |
So cool! Congrats! And yeah good point, lexrpc supports binary output and input (less well tested) server side, but not client side, sorry about that. Did you have to add it? (Thank you if so!) |
Re facets, afaik we've never actually used the AS1 => Bluesky facet code for anything real yet, so yeah I can believe it's untested (at least in real situations) and likely broken in some ways. For HTML content though, yes, that's intentional, I probably should have added a comment. I did the conversion from AS1 tags since it was easy, but for HTML, I didn't want to try yet since it seemed harder, and I didn't have a use case yet. I guess we do now! We figured out lots of these details for publishing to Twitter, hopefully those decisions work here too. Eg we parse out mf2 and use it for explicit structural elements like media, and otherwise just run (Fwiw we do end up with AS1-style tags with indices in granary/Bridgy when we convert from some silos, eg tweets from Twitter with mentions, links, etc. Doesn't really matter here though!) |
I ended up just implementing upload with RE facets, that makes sense. I think the linkify stuff we use for preview might be of some help here, though there will assuredly be some weird nuance due to unicode shenanigans. Are we able to ship the micropub stuff without showing any publishing UI? If so that might work well, otherwise I'd worry about users seeing a broken-ish feature. |
nvm I got over my fear snarfed/lexrpc#5 |
Good point! I guess I more meant merge than ship, ie we could merge this with just webmention support first, to keep the PR(s) manageable. We can definitely ship that first too, but yeah we'd want to hide the interactive form part of the publish UI if we do. |
Apologies @snarfed, need to focus on some non-Bridgy stuff for a bit that I've been neglecting! I've put my WIP in the bsky-publish branch on my fork of Granary, which is where basically all of the work is: https://github.com/JoelOtter/granary/tree/bsky-publish I mean to come back to this in two or three weeks but if you'd like to race ahead please don't hold back on my account! |
No worries! Totally ok, no obligation. I probably won't work on it much myself in the meantime, but I'll keep you posted. Best if luck with the rest! |
@JoelOtter just FYI I'm starting to look at this again. Let me know if you have any time freed up and you're interested in working on it with me! |
Hello! I'm still a bit swamped - we're bringing our game out of Early Access at the end of February so I have a few things pulling my attention until then. From March on I'll have a lot more time to get back to this, but if you want to go ahead please do! Happy to help out with reviewing code in the interim. |
Ahh yeah that makes sense. I caved a while back and made publish accept "external" replies like that as normal notes, so I guess we should do that here too. |
So if the reply is to a note we check its syndication links and reply to the matching syndicated post on the silo? It works for Masto so I guess I can just follow its implementation :) |
Oh that already happens, in |
Ahh do you think in this case then it's because the in-reply-to is a bsky.app URL, rather than a AT URI? |
Hmm no, bsky.app URLs should work too, I tested with those! |
Ah sorry I mis-wrote - the in-reply-to is a note URL, but the syndication link on that note is a bsky.app URL. |
This is the note it fails for - it's got a bsky link on it now but that's cos I added it manually https://www.joelotter.com/notes/2024/02/02-celeste2/ |
Ah ok! Yeah it's very possible that the in-reply-to synd link handling isn't working for Bluesky. It's here: Lines 470 to 528 in f3c0a0d
|
Fab, thanks! I'll have a crack at that this weekend, will be a good way to ease back into the swing of things. :) |
So, I think the naive solution to support the URLs is to make this change in Granary: diff --git a/granary/bluesky.py b/granary/bluesky.py
index 4e199afb..140b2045 100644
--- a/granary/bluesky.py
+++ b/granary/bluesky.py
@@ -571,7 +571,7 @@ def from_as1(obj, out_type=None, blobs=None, client=None):
# in reply to
reply = None
- in_reply_to = as1.get_object(obj, 'inReplyTo')
+ in_reply_to = client.base_object(obj)
if in_reply_to:
parent_ref = from_as1_to_strong_ref(in_reply_to, client=client)
reply = { However, this kind of makes
I do worry I'm stumbling into doing something silly here so if you have advice I'd appreciate it! |
I've made a PR snarfed/granary#673 with the last solution on this list, which does seem to work from my local testing. |
Nice! Pulling from the base object instead of raw |
This work ^ for incorporating syndication links is in. A few other things are remaining, eg #1661, but I'm ready to call v1 here done. I've posted an announcement at https://snarfed.org/2024-02-05_52058 . Congrats and thanks again @JoelOtter! |
Hmm did the syndication change roll out? I'm seeing the same error message, perhaps my fix didn't work after all... |
Still working locally! Not sure what's up |
Hmm! I thought I deployed it, but maybe not? I've deployed again, feel free to retry now. |
Congrats! I confirmed I can post to Bluesky if I manually send the webmention using the Anything I'm missing? I'm really excited about this, thanks again for all of the hard work. |
@miklb ooh thanks for the catch! Fixed, https://brid.gy/publish/bluesky is now serving GETs, feel free to try again. I'll also update docs soon. |
@snarfed I thought a post went through last night but I posted one today and it's not syndicating. Posted fine through fed.brid.gy Apologies, I'm sure I'm missing a step. |
Hmm! I don't see a webmention in Bridgy's logs from https://michaelbishop.me/note/1707189216 yet. I do see the link to https://brid.gy/publish/bluesky on that post, maybe try sending the wm again? https://brid.gy/bluesky/did:plc:ulxk572dnu5v56yssqyupulk#publishes shows that Bridgy Publish has posted two of your other posts to Bluesky ok. |
Thanks. I'm using a Netlify plugin/function for sending webmentions so I'm flying blind. For some reason it's only picking up the first link in the note to send a webmention for. If I only include an empty link to I've had on my to-do list to roll-my-own sending of WM so I can get the response and update the post with syndication link so this will expedite the need. Thanks for helping me debug and cheers again on all the work. [edit] ok there is a config on that plugin that I missed that defaults to setting the limit to first link for a url. I've bumped that up and all of my notes published to Bluesky. |
@snarfed would you prefer new issues for Bluesky related "issues"? Current question is about truncation brid.gy log
I'm currently using |
@miklb yes, new issues please! And thanks for the report! |
We only have backfeed for bsky currently - will use this issue to track publishing work.
The text was updated successfully, but these errors were encountered: