fix: explicitly set updated property when federating notes out

This commit is contained in:
Julian Lam
2024-09-24 12:15:10 -04:00
parent e0c410cd7c
commit 6fe4d44675
4 changed files with 12 additions and 4 deletions

View File

@@ -277,7 +277,8 @@ Mocks.note = async (post) => {
});
}
const published = new Date(parseInt(post.timestamp, 10)).toISOString();
const published = post.timestampISO;
const updated = post.edited ? post.editedISO : null;
// todo: post visibility
const to = new Set([activitypub._constants.publicAddress]);
@@ -420,6 +421,7 @@ Mocks.note = async (post) => {
cc: Array.from(cc),
inReplyTo,
published,
updated,
url: id,
attributedTo: `${nconf.get('url')}/uid/${post.user.uid}`,
context: `${nconf.get('url')}/topic/${post.topic.tid}`,