diff options
author | 2025-03-27 14:57:48 +0000 | |
---|---|---|
committer | 2025-03-27 14:57:48 +0000 | |
commit | 83a6aa0574190137b38331bd53795324139237cf (patch) | |
tree | 0cfbe858fb09325d8347b15b641a06df8d82db15 /filamento/src/logic/process_stanza.rs | |
parent | e703284539384b461d204c73e7e14daead3f06d9 (diff) | |
download | luz-83a6aa0574190137b38331bd53795324139237cf.tar.gz luz-83a6aa0574190137b38331bd53795324139237cf.tar.bz2 luz-83a6aa0574190137b38331bd53795324139237cf.zip |
feat: remove `UpdateMessage::Error` variant
Diffstat (limited to 'filamento/src/logic/process_stanza.rs')
-rw-r--r-- | filamento/src/logic/process_stanza.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/filamento/src/logic/process_stanza.rs b/filamento/src/logic/process_stanza.rs index 3dfe9fb..94257aa 100644 --- a/filamento/src/logic/process_stanza.rs +++ b/filamento/src/logic/process_stanza.rs @@ -271,7 +271,9 @@ pub async fn recv_iq( if let Err(e) = logic.db().delete_contact(item.jid.clone()).await { - error!("{}", RosterError::Cache(e.into())); + logic + .handle_error(RosterError::Cache(e.into()).into()) + .await; } Ok(Some(UpdateMessage::RosterDelete(item.jid))) } @@ -279,7 +281,9 @@ pub async fn recv_iq( let contact: Contact = item.into(); if let Err(e) = logic.db().upsert_contact(contact.clone()).await { - error!("{}", RosterError::Cache(e.into())); + logic + .handle_error(RosterError::Cache(e.into()).into()) + .await; } let iq = Iq { from: Some(connection.jid().clone()), @@ -293,7 +297,9 @@ pub async fn recv_iq( if let Err(e) = connection.write_handle().write(Stanza::Iq(iq)).await { - error!("could not reply to roster set: {}", e); + logic + .handle_error(RosterError::PushReply(e.into()).into()) + .await; } Ok(Some(UpdateMessage::RosterUpdate(contact))) } |