mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-16 21:40:23 +01:00
fix: wrong auto-categorization if group actor is explicitly included in audience
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user