fix: better handling of missing of invalid to, cc, timestamp values

This commit is contained in:
Julian Lam
2024-02-13 12:03:16 -05:00
parent 814c479405
commit 76d5feb7d6
2 changed files with 4 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ Notes.assert = async (uid, input, options = {}) => {
};
Notes.updateLocalRecipients = async (id, { to, cc }) => {
const recipients = new Set([...to, ...cc]);
const recipients = new Set([...(to || []), ...(cc || [])]);
const uids = new Set();
await Promise.all(Array.from(recipients).map(async (recipient) => {
const { type, id } = await activitypub.helpers.resolveLocalId(recipient);