mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: guard against missing to/cc
This commit is contained in:
@@ -78,7 +78,7 @@ inbox.create = async (req) => {
|
||||
|
||||
inbox.update = async (req) => {
|
||||
const { actor, object } = req.body;
|
||||
const isPublic = [...object.to, ...object.cc].includes(activitypub._constants.publicAddress);
|
||||
const isPublic = [...(object.to || []), ...(object.cc || [])].includes(activitypub._constants.publicAddress);
|
||||
|
||||
// Origin checking
|
||||
const actorHostname = new URL(actor).hostname;
|
||||
|
||||
Reference in New Issue
Block a user