-
Notifications
You must be signed in to change notification settings - Fork 13
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
BlueskyEmbed #1756
base: social-media-content
Are you sure you want to change the base?
BlueskyEmbed #1756
Conversation
text: "Lap time al fresco. Photo from my collection, no date/info.[image or embed]— Cats of Yore (@catsofyore.bsky.social) May 14, 2024 at 3:43 PM", | ||
}) | ||
).toMatchInlineSnapshot( | ||
`"<blockquote class="bluesky-embed" data-bluesky-uri="at://did:plc:xrr5j2okn7ew2zvcwsxus3gb/app.bsky.feed.post/3kshwuxmy5o2y" data-bluesky-cid="bafyreicg7axsdp6b7f4uj75ggdfhrdl52cqpjah45scox3prmqflwg557i">Lap time al fresco. Photo from my collection, no date/info.<br /><br /><a href="https://bsky.app/profile/did:plc:xrr5j2okn7ew2zvcwsxus3gb/post/3kshwuxmy5o2y?ref_src=embed">[image or embed]</a><br />— Cats of Yore (<a href="https://bsky.app/profile/did:plc:xrr5j2okn7ew2zvcwsxus3gb?ref_src=embed">@catsofyore.bsky.social</a>) <a href="https://bsky.app/profile/did:plc:xrr5j2okn7ew2zvcwsxus3gb/post/3kshwuxmy5o2y?ref_src=embed">May 14, 2024 at 3:43 PM</a></blockquote><script async src="https://embed.bsky.app/static/embed.js" charset="utf-8"></script>"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice
.as("blockquote") | ||
.outerJoin( | ||
doc.where({ type: "-html-script" }).as("scripts"), | ||
function scriptRightAfterIframe(blockquote, script: Script) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: the named functions here are nice for our performance tracing, but this kinda suggests we hoist the function definitions up to the top level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh yea, that would make sense to do for these
cfe433d
to
f88d980
Compare
adds detection of Bluesky embed codes and turns them into embeds. we cannot do URL detection on Bluesky embeds because we need the IPFS cid and uri of the post to properly display it.
this allows for direct linking to the post in cases where user consent was not provided or a web link is wanted
@copilot-robot prerelease |
Hi, @tim-evans, a pre-release has been published:
|
Adds support for detecting and rendering Bluesky posts from HTML. Bluesky's at protocol uses IPFS addressing to identify content, so we need to include both a
uri
, and acid
, which is the IPFS content id. Aurl
is also included so we have a permalink to the post in the case that the post cannot be shown due to user consent not being provided.