[Add] Notification handling
This commit is contained in:
parent
7f7b8a5cdd
commit
66c099f5ff
4 changed files with 10 additions and 2 deletions
6
src/data/communication.rs
Normal file → Executable file
6
src/data/communication.rs
Normal file → Executable 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,
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ impl OmegaConnection {
|
||||||
}
|
}
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
if retry > 5 {
|
if retry > 500 {
|
||||||
log_err!(
|
log_err!(
|
||||||
0,
|
0,
|
||||||
PrintType::Omega,
|
PrintType::Omega,
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue