diff --git a/services/channelQueue.js b/services/channelQueue.js index 19a60b6..3dde57a 100644 --- a/services/channelQueue.js +++ b/services/channelQueue.js @@ -83,6 +83,12 @@ function enqueueRename(channel, newName) { // Shares renameChains so a move+rename pair on the same channel executes in // call order. No coalescing: every move is a distinct chain link. +// +// lockPermissions: false preserves the channel's existing permission overwrites +// across the parent change. With the default (true), Discord re-syncs the +// channel's overwrites to match the new category and wipes per-user grants — +// in practice that kicked the ticket creator and any /add'd users off the +// channel on every escalate / de-escalate / /move. function enqueueMove(channel, categoryId) { let entry = renameChains.get(channel.id); if (!entry) { @@ -90,7 +96,7 @@ function enqueueMove(channel, categoryId) { renameChains.set(channel.id, entry); } - const next = entry.chain.catch(() => {}).then(() => channel.setParent(categoryId, { lockPermissions: true })); + const next = entry.chain.catch(() => {}).then(() => channel.setParent(categoryId, { lockPermissions: false })); entry.chain = next; next.catch((err) => {