From 609035b5879b1014d48ab56cf9c8c7797901f3d3 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 19 Jul 2024 09:38:30 -0400 Subject: [PATCH] fix: issue with topic actors not returning proper json --- src/controllers/activitypub/actors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/activitypub/actors.js b/src/controllers/activitypub/actors.js index beaf346e1b..d98a5bdd93 100644 --- a/src/controllers/activitypub/actors.js +++ b/src/controllers/activitypub/actors.js @@ -116,7 +116,7 @@ Actors.topic = async function (req, res, next) { pids.push(mainPid); pids = pids.map(pid => (utils.isNumber(pid) ? `${nconf.get('url')}/post/${pid}` : pid)); const digest = activitypub.helpers.generateDigest(new Set(pids)); - const ifNoneMatch = req.get('If-None-Match').split(',').map((tag) => { + const ifNoneMatch = (req.get('If-None-Match') || '').split(',').map((tag) => { tag = tag.trim(); if (tag.startsWith('"') && tag.endsWith('"')) { return tag.slice(1, tag.length - 1);