Introduce the ability of declining calls
This commit is contained in:
parent
f4697ff4d1
commit
bb9ce86a29
6 changed files with 181 additions and 29 deletions
|
@ -245,6 +245,17 @@ impl UserStore {
|
|||
self.incoming_call.1.clone()
|
||||
}
|
||||
|
||||
pub fn decline_call(&mut self) -> Result<()> {
|
||||
let mut incoming_call = self.incoming_call.0.borrow_mut();
|
||||
if incoming_call.is_some() {
|
||||
if let Some(client) = self.client.upgrade() {
|
||||
client.send(proto::DeclineCall {})?;
|
||||
}
|
||||
*incoming_call = None;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn handle_update_contacts(
|
||||
this: ModelHandle<Self>,
|
||||
message: TypedEnvelope<proto::UpdateContacts>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue