fedimbed.bluesky: fix quotes with external media
This commit is contained in:
parent
ac11f3a46b
commit
232a0f0115
1 changed files with 12 additions and 0 deletions
|
@ -48,6 +48,7 @@ const PLATFORM_COLORS = {
|
|||
pixelfed: 0x10c5f8,
|
||||
//cohost: 0x83254f,
|
||||
bluesky: 0x0085ff,
|
||||
twitter: 0xff6c60, // Nitter accent color
|
||||
};
|
||||
|
||||
const BSKY_DOMAINS = [
|
||||
|
@ -475,6 +476,17 @@ async function bluesky(msg, url, spoiler = false) {
|
|||
videos.push({url: videoUrl, desc: post.embed.alt, type: contentType});
|
||||
|
||||
embeds.push({...mainEmbed, fields: [{name: "\u200b", value: `[Video Link](${videoUrl})`}]});
|
||||
} else if (post.embed.media.$type === "app.bsky.embed.external#view") {
|
||||
if (post.embed.external.uri.includes("tenor.com")) {
|
||||
const url = new URL(post.embed.external.uri);
|
||||
url.searchParams.delete("hh");
|
||||
url.searchParams.delete("ww");
|
||||
embeds.push({...mainEmbed, image: {url: url.toString()}});
|
||||
} else {
|
||||
embeds.push(mainEmbed);
|
||||
}
|
||||
} else {
|
||||
embeds.push(mainEmbed);
|
||||
}
|
||||
|
||||
const quoteData = await blueskyQuoteEmbed(post.embed.record.record);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue