mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-27 17:11:14 +01:00
fix: notes.assertPrivate sanity checks
This commit is contained in:
@@ -229,6 +229,10 @@ Notes.assertPrivate = async (object) => {
|
|||||||
// Given an object, adds it to an existing chat or creates a new chat otherwise
|
// Given an object, adds it to an existing chat or creates a new chat otherwise
|
||||||
// todo: context stuff
|
// todo: context stuff
|
||||||
|
|
||||||
|
if (!object || !object.id || !activitypub.helpers.isUri(object.id)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const localUids = [];
|
const localUids = [];
|
||||||
const recipients = new Set([...object.to, ...object.cc]);
|
const recipients = new Set([...object.to, ...object.cc]);
|
||||||
await Promise.all(Array.from(recipients).map(async (value) => {
|
await Promise.all(Array.from(recipients).map(async (value) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user