feat: log all post edits to the event log, return eid when logging events, plumb eid into Update(Note) to federate out as a unique id

This commit is contained in:
Julian Lam
2024-03-13 15:27:59 -04:00
parent 0bfdbb6a5c
commit 83392f3ca2
3 changed files with 11 additions and 6 deletions

View File

@@ -131,7 +131,7 @@ activitypubApi.update.profile = enabledCheck(async (caller, { uid }) => {
});
});
activitypubApi.update.note = enabledCheck(async (caller, { post }) => {
activitypubApi.update.note = enabledCheck(async (caller, { post, eid }) => {
const object = await activitypub.mocks.note(post);
const { targets } = await buildRecipients(object, post.user.uid);
@@ -142,6 +142,7 @@ activitypubApi.update.note = enabledCheck(async (caller, { post }) => {
}
const payload = {
id: `${nconf.get('url')}/api/v3/events/${eid}`,
type: 'Update',
to: object.to,
cc: object.cc,