fedimbed: missed a null check, fix timestamp
This commit is contained in:
parent
735aa308f8
commit
a216e5b4fb
1 changed files with 2 additions and 2 deletions
|
@ -198,7 +198,7 @@ async function processUrl(msg, url) {
|
|||
author = {
|
||||
name: postData2.account?.display_name ?? postData2.user?.name,
|
||||
handle:
|
||||
postData2.account.fqn ??
|
||||
postData2.account?.fqn ??
|
||||
`${postData2.account?.username ?? postData2.user?.username}@${
|
||||
urlObj.hostname
|
||||
}`,
|
||||
|
@ -209,7 +209,7 @@ async function processUrl(msg, url) {
|
|||
}`,
|
||||
avatar: postData2.account?.avatar ?? postData2.user?.avatarUrl,
|
||||
};
|
||||
timestamp = postData2.created_at;
|
||||
timestamp = postData2.created_at ?? postData2.createdAt;
|
||||
const attachments = postData2.media_attachments ?? postData2.files;
|
||||
if (attachments) {
|
||||
for (const attachment of attachments) {
|
||||
|
|
Loading…
Reference in a new issue