fix: audio close status sync

This commit is contained in:
Kingtous
2023-02-07 19:09:22 +08:00
parent 795b0068d0
commit db8b6d618f
2 changed files with 13 additions and 2 deletions

View File

@@ -402,6 +402,9 @@ impl Connection {
}
ipc::Data::CloseVoiceCall(_reason) => {
conn.close_voice_call().await;
// Notify the peer that we closed the voice call.
let req = new_voice_call_request(false);
conn.send(req).await;
}
_ => {}
}
@@ -1639,6 +1642,7 @@ impl Connection {
if let Some(sound_input) = std::mem::replace(&mut self.audio_input_device_before_voice_call, None) {
set_sound_input(sound_input);
}
// Notify the connection manager that the voice call has been closed.
self.send_to_cm(Data::CloseVoiceCall("".to_owned()));
}