(fix): call invite stuff

This commit is contained in:
Alois 2026-07-06 21:34:24 +02:00
commit 5eed0033c1
5 changed files with 20 additions and 15 deletions

View file

@ -328,10 +328,7 @@ impl ClientConnection {
/// Handle call invite
async fn handle_call_invite(self: Arc<Self>, cv: CommunicationValue) {
let receiver_id: i128 = cv
.get_data(DataType::ReceiverId)
.as_signed_number()
.unwrap_or(0);
let receiver_id: i128 = cv.get_data(DataType::ReceiverId).as_number().unwrap_or(0);
if receiver_id == 0 {
self.send_error_response(cv.get_id(), CommunicationType::ErrorNoUserId)
.await;

View file

@ -531,7 +531,12 @@ impl IotaConnection {
}
pub async fn handle_close(&self) {
log_out!(self.iota_id as i64, PrintType::Iota, "Iota {} disconnected", self.iota_id);
log_out!(
self.iota_id as i64,
PrintType::Iota,
"Iota {} disconnected",
self.iota_id
);
if let Some(rho_conn) = self.get_rho_connection().await {
rho_conn.close_iota_connection().await;
}