fix: federate out a Create(Note) instead of just the note... doi...

#12834
This commit is contained in:
Julian Lam
2024-10-07 14:29:45 -04:00
parent 2ab5ea39a6
commit 74d5ced29e

View File

@@ -223,7 +223,15 @@ activitypubApi.create.privateNote = enabledCheck(async (caller, { mid, messageOb
let targets = await messaging.getUidsInRoom(roomId, 0, -1); let targets = await messaging.getUidsInRoom(roomId, 0, -1);
targets = targets.filter(uid => !utils.isNumber(uid)); // remote uids only targets = targets.filter(uid => !utils.isNumber(uid)); // remote uids only
const payload = await activitypub.mocks.notes.private({ messageObj }); const object = await activitypub.mocks.notes.private({ messageObj });
const payload = {
id: `${object.id}#activity/create/${Date.now()}`,
type: 'Create',
to: object.to,
object,
};
await activitypub.send('uid', messageObj.fromuid, targets, payload); await activitypub.send('uid', messageObj.fromuid, targets, payload);
}); });