Compare commits

...

2 commits

Author SHA1 Message Date
Sugar
0911bc92ac merge: fix: send null for empty edited_at in mastodon api (!487)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/487

Approved-by: Amelia Yukii <amelia.yukii@shourai.de>
2024-04-03 13:27:51 +00:00
Sugar🍬🍭🏳️‍⚧
023e2cad73 fix: send null for empty edited_at in mastodon api 2024-04-01 20:34:43 +02:00

View file

@ -279,7 +279,8 @@ export class MastoConverters {
emoji_reactions: status.emoji_reactions,
bookmarked: false,
quote: isQuote ? await this.convertReblog(status.reblog) : false,
edited_at: note.updatedAt?.toISOString(),
// optional chaining cannot be used, as it evaluates to undefined, not null
edited_at: note.updatedAt ? note.updatedAt.toISOString() : null,
});
}
}