From 5e71d597a47c6b16859a8be4c49d855e821008f1 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 18 Feb 2025 10:12:22 -0500 Subject: [PATCH] fix: notes.assertPrivate sanity checks --- src/activitypub/notes.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js index 03cca7d9d8..f40d4bdb68 100644 --- a/src/activitypub/notes.js +++ b/src/activitypub/notes.js @@ -229,6 +229,10 @@ Notes.assertPrivate = async (object) => { // Given an object, adds it to an existing chat or creates a new chat otherwise // todo: context stuff + if (!object || !object.id || !activitypub.helpers.isUri(object.id)) { + return null; + } + const localUids = []; const recipients = new Set([...object.to, ...object.cc]); await Promise.all(Array.from(recipients).map(async (value) => {