mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: bad logic that invisibly broke outgoing user follows completely
This commit is contained in:
@@ -38,7 +38,7 @@ function enabledCheck(next) {
|
|||||||
activitypubApi.follow = enabledCheck(async (caller, { type, id, actor } = {}) => {
|
activitypubApi.follow = enabledCheck(async (caller, { type, id, actor } = {}) => {
|
||||||
// Privilege checks should be done upstream
|
// Privilege checks should be done upstream
|
||||||
const assertion = await activitypub.actors.assert(actor);
|
const assertion = await activitypub.actors.assert(actor);
|
||||||
if (!assertion || !assertion.length) {
|
if (!assertion || (Array.isArray(assertion) && assertion.length)) {
|
||||||
throw new Error('[[error:activitypub.invalid-id]]');
|
throw new Error('[[error:activitypub.invalid-id]]');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user