opt: close voice call msg

This commit is contained in:
Kingtous 2023-02-07 18:17:31 +08:00
parent 4ea41b52d3
commit 795b0068d0

View File

@ -1599,8 +1599,6 @@ impl Connection {
// Notify the connection manager. // Notify the connection manager.
self.send_to_cm(Data::VoiceCallIncoming); self.send_to_cm(Data::VoiceCallIncoming);
} else { } else {
// Notify the connection manager.
self.send_to_cm(Data::CloseVoiceCall("".to_owned()));
self.close_voice_call().await; self.close_voice_call().await;
} }
} }
@ -1641,6 +1639,7 @@ impl Connection {
if let Some(sound_input) = std::mem::replace(&mut self.audio_input_device_before_voice_call, None) { if let Some(sound_input) = std::mem::replace(&mut self.audio_input_device_before_voice_call, None) {
set_sound_input(sound_input); set_sound_input(sound_input);
} }
self.send_to_cm(Data::CloseVoiceCall("".to_owned()));
} }
async fn update_option(&mut self, o: &OptionMessage) { async fn update_option(&mut self, o: &OptionMessage) {