1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-20 16:35:17 +00:00

Can leave a call

This commit is contained in:
2021-02-10 18:04:03 +01:00
parent 3c696bde5f
commit 7a0f9620b2
8 changed files with 117 additions and 7 deletions

View File

@ -44,6 +44,12 @@ impl Hash for UserID {
}
}
impl PartialEq<&UserID> for UserID {
fn eq(&self, other: &&UserID) -> bool {
self.0 == other.0
}
}
#[derive(Debug, PartialEq)]
pub enum UserPageStatus {
OPEN,

View File

@ -51,6 +51,11 @@ impl UserWsRequestHandler {
return self.response.unwrap();
}
/// Get a pointer to the websocket connection
pub fn get_conn(&self) -> &UserWsConnection {
&self.connection
}
/// Update information about the WebSocket connection
pub fn update_conn<H>(&mut self, do_updates: H) -> ResultBoxError where H: FnOnce(&mut UserWsConnection) {
self.connection = self.connection.clone().replace(do_updates);