mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
fix: show password protected channels
This commit is contained in:
1 parent
ff508a8eb9
commit
cec2a81549
23 files changed
+189
-27
No files matched your search
@@ -98,6 +98,24 @@ test("channel changes preserve large identifiers and publish only actual create,
|
||||
assert.equal(f.events.length, 0);
|
||||
});
|
||||
|
||||
test("live channel password changes update and publish the lock state without a full tree refresh", t => {
|
||||
const f = fixture(t);
|
||||
f.client.emit("directorySnapshot", snapshot(member(1)));
|
||||
f.coordinator.syncSelf(); f.phase.published = true;
|
||||
|
||||
f.client.emit("channelPasswordProtectionChanged", { channelId: 2n, passwordProtected: true });
|
||||
assert.equal(f.state.channelTree.find(item => item.id === "2")?.passwordProtected, true);
|
||||
let published = f.messages.at(-1);
|
||||
assert.equal(published?.type, "channelList");
|
||||
if (published?.type === "channelList") assert.equal(published.channels.find(item => item.id === "2")?.passwordProtected, true);
|
||||
|
||||
f.client.emit("channelPasswordProtectionChanged", { channelId: 2n, passwordProtected: false });
|
||||
assert.equal(f.state.channelTree.find(item => item.id === "2")?.passwordProtected, false);
|
||||
published = f.messages.at(-1);
|
||||
assert.equal(published?.type, "channelList");
|
||||
if (published?.type === "channelList") assert.equal(published.channels.find(item => item.id === "2")?.passwordProtected, false);
|
||||
});
|
||||
|
||||
test("reset rejects backoff events and close detaches only owned listeners including captured callbacks", t => {
|
||||
const f = fixture(t);
|
||||
f.client.emit("directorySnapshot", snapshot(member(1), member(2)));
|
||||
|
||||
Reference in new issue
Block a user