fedimbed: add timestamps
This commit is contained in:
parent
13b6357640
commit
04283d72a6
1 changed files with 5 additions and 2 deletions
|
@ -143,6 +143,7 @@ async function processUrl(msg, url) {
|
|||
url: postData2.account.url,
|
||||
avatar: postData2.account.avatar,
|
||||
};
|
||||
timestamp = postData2.created_at;
|
||||
for (const attachment of postData2.media_attachments) {
|
||||
attachments.push({
|
||||
url: attachment.url,
|
||||
|
@ -159,6 +160,7 @@ async function processUrl(msg, url) {
|
|||
} else {
|
||||
content = postData.content;
|
||||
cw = postData.summary;
|
||||
timestamp = postData.published;
|
||||
for (const attachment of postData.attachment) {
|
||||
attachments.push({
|
||||
url: attachment.url,
|
||||
|
@ -229,10 +231,11 @@ async function processUrl(msg, url) {
|
|||
const baseEmbed = {
|
||||
color,
|
||||
url,
|
||||
timestamp,
|
||||
description: desc,
|
||||
title: `${author.name} (${author.handle})`,
|
||||
author: {
|
||||
name: platformName,
|
||||
footer: {
|
||||
text: platformName,
|
||||
},
|
||||
thumbnail: {
|
||||
url: author.avatar,
|
||||
|
|
Loading…
Reference in a new issue