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:
Moepchi committed 2026-08-10 18:47:37 +02:00
1 parent 4847972c80
commit 6e343c4d4c
4 files changed
+46 -21

No files matched your search

+5 -2
View File
@@ -330,6 +330,7 @@ interface ClientInfo {
databaseId: number;
channelGroup: number;
serverGroups: number[];
hasTalkPower: boolean;
}
interface GroupEntry {
@@ -533,7 +534,7 @@ function ChannelTree({
<li key={c.id}>
<div
className={`ts-row ts-client-row${c.id === ownClientId ? " ts-self" : ""}${
talkers.has(c.id) ? " ts-talking" : ""
talkers.has(c.id) && c.hasTalkPower ? " ts-talking" : ""
}`}
onClick={c.id === ownClientId ? undefined : () => onOpenPrivateChat(c.id, c.name)}
onContextMenu={(e) => onClientContextMenu(e, c.id, c.name, c.id === ownClientId)}
@@ -5839,7 +5840,9 @@ function AppInner() {
const inputMuted = ownClient?.inputMuted ?? false;
const outputMuted = ownClient?.outputMuted ?? false;
const displayTalkers =
selfActive && !inputMuted && ownClient ? new Set(talkers).add(ownClient.id) : talkers;
selfActive && !inputMuted && ownClient?.hasTalkPower
? new Set(talkers).add(ownClient.id)
: talkers;
const t = useT();
return (