From 57f7f2628e595aba1a9fc1f46f4f9060469449b9 Mon Sep 17 00:00:00 2001 From: CatAClock Date: Thu, 22 May 2025 16:43:42 -0700 Subject: [PATCH] fixed the embeds --- JS/expanded.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/JS/expanded.js b/JS/expanded.js index 32973f4..b3cae1d 100644 --- a/JS/expanded.js +++ b/JS/expanded.js @@ -197,16 +197,16 @@ async function CreateMedia(Media, Element, Author = undefined) { var Texty = await BlueskyAPI.GetPosts([Media.embed.record.uri]); console.log(Texty); Element.innerHTML += "

" + Texty.posts[0].record.text + "


"; - if (Texty.posts[0].embed.$type == "app.bsky.embed.images") { - for (let i of Texty.posts[0].embed.images) { - var Blobby = await BlueskyAPI.GetBlob(Author, i.image.ref.$link); + if (Texty.posts[0].record.embed.$type == "app.bsky.embed.images") { + for (let i of Texty.posts[0].record.embed.images) { + var Blobby = await BlueskyAPI.GetBlob(Texty.posts[0].author.did, i.image.ref.$link); var ObjectURL = URL.createObjectURL(Blobby); - Element.innerHTML += "" + i.alt + ""; + Element.innerHTML += "" + i.alt + ""; } - } else if (Media.embed.$type == "app.bsky.embed.video") { - var Blobby = await BlueskyAPI.GetBlob(Author, Texty.posts[0].embed.video.ref.$link); + } else if (Texty.posts[0].record.embed.$type == "app.bsky.embed.video") { + var Blobby = await BlueskyAPI.GetBlob(Texty.posts[0].author.did, Texty.posts[0].record.embed.video.ref.$link); var ObjectURL = URL.createObjectURL(Blobby); - Element.innerHTML += ""; + Element.innerHTML += ""; } // It's not an embed, continue... } else if (Media.embed.$type == "app.bsky.embed.images") {