mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
fix: logic error in out.remove.context
This commit is contained in:
@@ -376,7 +376,10 @@ Out.move.context = enabledCheck(async (uid, tid) => {
|
|||||||
const isLocal = id => utils.isNumber(id) && parseInt(id, 10) > 0;
|
const isLocal = id => utils.isNumber(id) && parseInt(id, 10) > 0;
|
||||||
if (isLocal(oldCid) && !isLocal(cid)) { // moving to remote/uncategorized
|
if (isLocal(oldCid) && !isLocal(cid)) { // moving to remote/uncategorized
|
||||||
return Out.remove.context(uid, tid);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user