fix: bad logic that invisibly broke outgoing user follows completely

This commit is contained in:
Julian Lam
2025-02-02 03:27:54 -05:00
parent 1cdf37a218
commit 51e660d5ae

View File

@@ -38,7 +38,7 @@ function enabledCheck(next) {
activitypubApi.follow = enabledCheck(async (caller, { type, id, actor } = {}) => {
// Privilege checks should be done upstream
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]]');
}