mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
fix: sync mute state and handle move permissions
This commit is contained in:
1 parent
6539479d10
commit
6a821b760e
4 files changed
+48
-127
No files matched your search
@@ -354,21 +354,6 @@ export class TSClient extends EventEmitter {
|
||||
await tsClientMove(this.client, clientId, channelId, password);
|
||||
}
|
||||
|
||||
/**
|
||||
* Probe whether this identity may move a visible client into a channel.
|
||||
*
|
||||
* The browser client protocol does not expose ServerQuery's `permget`, so
|
||||
* the only authoritative capability check available through this session is
|
||||
* the same `clientmove` operation the UI will use. The bridge calls this
|
||||
* with the client's current channel, making the probe a no-op when accepted;
|
||||
* TeamSpeak still evaluates both move-power permissions.
|
||||
*/
|
||||
async probeMovePermission(clientId: number, channelId: bigint): Promise<void> {
|
||||
if (!this.client || !this.connected) throw new Error("TeamSpeak session is not ready");
|
||||
if (!Number.isInteger(clientId) || clientId <= 0 || clientId > 65535) throw new Error("Invalid TeamSpeak client id");
|
||||
await tsClientMove(this.client, clientId, channelId);
|
||||
}
|
||||
|
||||
getClientId(): number {
|
||||
// The SDK learns the real client id during the welcome sequence, before
|
||||
// TSClient.connect() resumes. Reading it from the SDK prevents the first
|
||||
|
||||
Reference in new issue
Block a user