mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +08:00
Fix talking indicator: also respect missing talk power in moderated channels
The previous fix only accounted for the local mute toggle. In a moderated channel (one with a talk power requirement) a client without sufficient talk power still has selfActive/VAD firing locally and no local concept of whether they're actually allowed to transmit, so the indicator stayed on regardless. The connector now computes has_talk_power per client from the book state (talk_power_granted || talk_power >= channel.needed_talk_power), mirroring tsclientlib's own internal intern_can_send_audio moderated-channel check, and threads it through gateway and frontend. The talking indicator (both the own-client injection into displayTalkers and the general per-client render in ChannelTree) now requires hasTalkPower too.
This commit is contained in:
1 parent
4847972c80
commit
6e343c4d4c
4 files changed
+46
-21
No files matched your search
@@ -36,6 +36,7 @@ export interface ClientInfo {
|
||||
databaseId: number;
|
||||
channelGroup: number;
|
||||
serverGroups: number[];
|
||||
hasTalkPower: boolean;
|
||||
}
|
||||
|
||||
export interface GroupEntry {
|
||||
@@ -233,6 +234,7 @@ export class Ts3Connection {
|
||||
database_id: number;
|
||||
channel_group: number;
|
||||
server_groups: number[];
|
||||
has_talk_power: boolean;
|
||||
}
|
||||
|
||||
interface RawChannelInfo {
|
||||
@@ -387,6 +389,7 @@ export class Ts3Connection {
|
||||
databaseId: c.database_id,
|
||||
channelGroup: c.channel_group,
|
||||
serverGroups: c.server_groups,
|
||||
hasTalkPower: c.has_talk_power,
|
||||
})),
|
||||
});
|
||||
} else if (event.type === "privateMessage") {
|
||||
|
||||
Reference in new issue
Block a user