[Add] Notification handling

This commit is contained in:
Alex-Emmet 2026-02-08 20:13:50 +01:00
commit 66c099f5ff
4 changed files with 10 additions and 2 deletions

6
src/data/communication.rs Normal file → Executable file
View file

@ -35,6 +35,7 @@ pub enum DataTypes {
denied_profiles, denied_profiles,
content, content,
messages, messages,
notifications,
send_time, send_time,
get_time, get_time,
get_variant, get_variant,
@ -142,6 +143,11 @@ pub enum CommunicationType {
message_other_iota, message_other_iota,
message_chunk, message_chunk,
messages_get, messages_get,
push_notification,
read_notification,
get_notifications,
change_confirm, change_confirm,
confirm_receive, confirm_receive,
confirm_read, confirm_read,

View file

@ -126,7 +126,7 @@ impl OmegaConnection {
} }
loop { loop {
if retry > 5 { if retry > 500 {
log_err!( log_err!(
0, 0,
PrintType::Omega, PrintType::Omega,

View file

@ -361,6 +361,8 @@ impl ClientConnection {
} }
if cv.is_type(CommunicationType::change_user_data) if cv.is_type(CommunicationType::change_user_data)
|| cv.is_type(CommunicationType::read_notification)
|| cv.is_type(CommunicationType::get_notifications)
|| cv.is_type(CommunicationType::get_user_data) || cv.is_type(CommunicationType::get_user_data)
|| cv.is_type(CommunicationType::get_iota_data) || cv.is_type(CommunicationType::get_iota_data)
|| cv.is_type(CommunicationType::delete_user) || cv.is_type(CommunicationType::delete_user)

View file

@ -32,7 +32,6 @@ use x448::PublicKey;
use super::{rho_connection::RhoConnection, rho_manager}; use super::{rho_connection::RhoConnection, rho_manager};
use crate::{ use crate::{
// calls::call_manager::CallManager,
data::communication::{CommunicationType, CommunicationValue, DataTypes}, data::communication::{CommunicationType, CommunicationValue, DataTypes},
omega::omega_connection::OmegaConnection, omega::omega_connection::OmegaConnection,
}; };
@ -434,6 +433,7 @@ impl IotaConnection {
} }
if cv.is_type(CommunicationType::change_iota_data) if cv.is_type(CommunicationType::change_iota_data)
|| cv.is_type(CommunicationType::push_notification)
|| cv.is_type(CommunicationType::get_user_data) || cv.is_type(CommunicationType::get_user_data)
|| cv.is_type(CommunicationType::get_iota_data) || cv.is_type(CommunicationType::get_iota_data)
|| cv.is_type(CommunicationType::get_register) || cv.is_type(CommunicationType::get_register)