fix: issue with topic actors not returning proper json

This commit is contained in:
Julian Lam
2024-07-19 09:38:30 -04:00
parent ff0c289e1d
commit 609035b587

View File

@@ -116,7 +116,7 @@ Actors.topic = async function (req, res, next) {
pids.push(mainPid); pids.push(mainPid);
pids = pids.map(pid => (utils.isNumber(pid) ? `${nconf.get('url')}/post/${pid}` : pid)); pids = pids.map(pid => (utils.isNumber(pid) ? `${nconf.get('url')}/post/${pid}` : pid));
const digest = activitypub.helpers.generateDigest(new Set(pids)); 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(); tag = tag.trim();
if (tag.startsWith('"') && tag.endsWith('"')) { if (tag.startsWith('"') && tag.endsWith('"')) {
return tag.slice(1, tag.length - 1); return tag.slice(1, tag.length - 1);