fix: minor adjustment in logic to work around relation logic

This commit is contained in:
Julian Lam
2024-06-14 10:20:50 -04:00
parent 839928b390
commit 1219d7d3b8

View File

@@ -82,11 +82,12 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
.filter(({ type }) => type === 'category') .filter(({ type }) => type === 'category')
.map(obj => obj.id); .map(obj => obj.id);
if (recipientCids.length) { if (recipientCids.length) {
cid = recipientCids.shift(); // Overrides passed-in value, respect addressing from main post over booster
options.cid = recipientCids.shift();
} }
// mainPid ok to leave as-is // mainPid ok to leave as-is
cid = cid || options.cid || -1; cid = options.cid || -1;
title = name || activitypub.helpers.generateTitle(utils.decodeHTMLEntities(content)); title = name || activitypub.helpers.generateTitle(utils.decodeHTMLEntities(content));
} }
mainPid = utils.isNumber(mainPid) ? parseInt(mainPid, 10) : mainPid; mainPid = utils.isNumber(mainPid) ? parseInt(mainPid, 10) : mainPid;