Fixed some client move issues

Signed-off-by: WolverinDEV <git@teaspeak.de>
canary
WolverinDEV 2019-12-20 21:17:45 +01:00
parent fee476da2c
commit aadb712422
No known key found for this signature in database
GPG Key ID: 77A6C15085150EEB
1 changed files with 10 additions and 9 deletions

View File

@ -593,21 +593,22 @@ namespace connection {
client.currentChannel().channelId, channel_from.channelId
);
}
}
let current_clients: ClientEntry[];
if(self) {
} else {
channel_from = client.currentChannel();
current_clients = client.channelTree.clientsByChannel(client.currentChannel());
this.connection_handler.update_voice_status(channel_to);
}
tree.moveClient(client, channel_to);
for(const entry of current_clients || [])
if(entry !== client && entry.get_audio_handle())
entry.get_audio_handle().abort_replay();
if(self) {
this.connection_handler.update_voice_status(channel_to);
for(const entry of client.channelTree.clientsByChannel(channel_from)) {
if(entry !== client && entry.get_audio_handle()) {
entry.get_audio_handle().abort_replay();
entry.speaking = false;
}
}
const side_bar = this.connection_handler.side_bar;
side_bar.info_frame().update_channel_talk();