fedimbed.bluesky: reply header

This commit is contained in:
Cynthia Foxwell 2024-11-09 00:14:22 -07:00
parent 2d0d33bb33
commit 839f20e7d3

View file

@ -218,6 +218,16 @@ async function bluesky(msg, url, spoiler = false) {
timestamp: post.record.createdAt,
};
if (data.thread.parent) {
const reply = data.thread.parent.post;
mainEmbed.author = {
name: `\u21a9 Replying to: ${reply.author.displayName} (${reply.author.handle})`,
url: `https://bsky.app/profile/${reply.author.handle}/post/${reply.uri.substring(
reply.uri.lastIndexOf("/") + 1
)}`,
};
}
if (post.embed) {
switch (post.embed.$type) {
case "app.bsky.embed.images#view": {