feat(call): persist call invites

This commit is contained in:
Alois 2026-09-26 10:23:58 +02:00
commit feb06814e8
Signed by: alois
SSH key fingerprint: SHA256:GBzT2DXvAuGV9XIV5W3WrzVpjU54FThmxHXdbz95J24
10 changed files with 306 additions and 15 deletions

View file

@ -1770,6 +1770,10 @@ impl OmikronConnection {
dispatch!(MessageStoragePolicyGet, handle_message_storage_policy_get);
dispatch!(MessageStoragePolicySet, handle_message_storage_policy_set);
dispatch!(UserBlockCheck, handle_user_block_check);
dispatch!(CallContactCheck, handle_call_contact_check);
dispatch!(CallEnvelopeStore, handle_call_envelope_store);
dispatch!(CallEnvelopeGet, handle_call_envelope_get);
dispatch!(CallContactAccept, handle_call_contact_accept);
dispatch!(EraseHostedUserData, handle_erase_hosted_user_data);
dispatch!(ProvisionIotaUser, handle_iota_user_provisioning);
}
@ -3095,6 +3099,42 @@ impl OmikronConnection {
.await;
}
async fn handle_call_contact_check(self: Arc<Self>, cv: &CommunicationValue) {
let _ = self
.send_message(&message_handlers::handle_call_contact_check(cv))
.await;
}
async fn handle_call_envelope_store(self: Arc<Self>, cv: &CommunicationValue) {
let response = match CONFIG
.load()
.omikron_id
.and_then(|id| i64::try_from(id).ok())
{
Some(owner) => message_handlers::handle_call_envelope_store(cv, owner),
None => error_response(cv, CommunicationType::ErrorInternal),
};
let _ = self.send_message(&response).await;
}
async fn handle_call_envelope_get(self: Arc<Self>, cv: &CommunicationValue) {
let response = match CONFIG
.load()
.omikron_id
.and_then(|id| i64::try_from(id).ok())
{
Some(owner) => message_handlers::handle_call_envelope_get(cv, owner),
None => error_response(cv, CommunicationType::ErrorInternal),
};
let _ = self.send_message(&response).await;
}
async fn handle_call_contact_accept(self: Arc<Self>, cv: &CommunicationValue) {
let _ = self
.send_message(&message_handlers::handle_call_contact_accept(cv))
.await;
}
// -------------------------------------------------------------------------
// Public API
// -------------------------------------------------------------------------