xmpp: update to edition 2024

Signed-off-by: pep <pep@bouah.net>
This commit is contained in:
pep 2025-11-13 19:58:14 +01:00
commit e503f016a3
19 changed files with 40 additions and 29 deletions

View file

@ -38,7 +38,10 @@ pub async fn handle_presence(agent: &mut Agent, presence: Presence) -> Vec<Event
agent.rooms_joined.insert(from.clone(), nick.clone());
agent.rooms_joining.remove(&from);
} else {
warn!("Received self-presence from {} while the room was not marked as joining.", presence.from.unwrap());
warn!(
"Received self-presence from {} while the room was not marked as joining.",
presence.from.unwrap()
);
}
events.push(Event::RoomJoined(from.clone()));
}
@ -48,7 +51,10 @@ pub async fn handle_presence(agent: &mut Agent, presence: Presence) -> Vec<Event
agent.rooms_joined.remove(&from);
agent.rooms_leaving.remove(&from);
} else {
warn!("Received self-presence unavailable from {} while the room was not marked as leaving.", presence.from.unwrap());
warn!(
"Received self-presence unavailable from {} while the room was not marked as leaving.",
presence.from.unwrap()
);
}
events.push(Event::RoomLeft(from.clone()));
}

View file

@ -5,7 +5,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
use tokio_xmpp::parsers::{
caps::{compute_disco, hash_caps, Caps},
caps::{Caps, compute_disco, hash_caps},
disco::DiscoInfoResult,
hashes::Algo,
presence::{Presence, Type as PresenceType},