Skip to content

Node.js based forum software built for the modern web

fix: logic error in out.remove.context

Julian Lamab9154aa49a1
diff --git a/src/activitypub/out.js b/src/activitypub/out.js
index 40d597db51..9c9bdb5dba 100644
--- a/src/activitypub/out.js
+++ b/src/activitypub/out.js
@@ -376,7 +376,10 @@ Out.move.context = enabledCheck(async (uid, tid) => {
const isLocal = id => utils.isNumber(id) && parseInt(id, 10) > 0;
if (isLocal(oldCid) && !isLocal(cid)) { // moving to remote/uncategorized
return Out.remove.context(uid, tid);
- } else if ((isLocal(cid) && !isLocal(oldCid)) || [cid, oldCid].every(!isLocal)) { // stealing or remote-to-remote
+ } else if (
+ (isLocal(cid) && !isLocal(oldCid)) || // stealing, or
+ [cid, oldCid].every(id => !isLocal(id)) // remote-to-remote
+ ) {
return;
}