fix: wrong auto-categorization if group actor is explicitly included in audience

This commit is contained in:
Julian Lam
2025-11-04 11:09:15 -05:00
parent 5cfec5b1a9
commit be4d0e811e

View File

@@ -137,7 +137,11 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
const { hostname } = new URL(mainPid); const { hostname } = new URL(mainPid);
remoteCid = Array.from(set).filter((id, idx) => { remoteCid = Array.from(set).filter((id, idx) => {
const { hostname: cidHostname } = new URL(id); const { hostname: cidHostname } = new URL(id);
return assertedGroups[idx] && cidHostname === hostname; const explicitAudience = Array.isArray(_activitypub.audience) ?
_activitypub.audience.includes(id) :
_activitypub.audience === id;
return assertedGroups[idx] && (explicitAudience || cidHostname === hostname);
}).shift(); }).shift();
} catch (e) { } catch (e) {
// noop // noop