From b8f74e6bced6b18c3971b41efb8ba1e4378fce86 Mon Sep 17 00:00:00 2001 From: xmppftw Date: Wed, 18 Dec 2024 19:14:02 +0100 Subject: [PATCH] xmpp: Common structure for imports --- xmpp/src/agent.rs | 16 ++++++++-------- xmpp/src/message/send.rs | 2 +- xmpp/src/muc/private_message.rs | 2 +- xmpp/src/muc/room.rs | 9 ++++----- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/xmpp/src/agent.rs b/xmpp/src/agent.rs index fa2a043e..67fdfb32 100644 --- a/xmpp/src/agent.rs +++ b/xmpp/src/agent.rs @@ -8,15 +8,15 @@ use std::collections::HashMap; use std::path::{Path, PathBuf}; use std::sync::Arc; use tokio::sync::RwLock; -pub use tokio_xmpp::parsers; -use tokio_xmpp::parsers::disco::DiscoInfoResult; -pub use tokio_xmpp::{ - jid::{BareJid, FullJid, Jid, ResourcePart}, - minidom::Element, - Client as TokioXmppClient, -}; -use crate::{event_loop, message, muc, upload, Error, Event}; +use crate::{ + event_loop, + jid::{BareJid, Jid, ResourcePart}, + message, muc, + parsers::disco::DiscoInfoResult, + upload, Error, Event, +}; +use tokio_xmpp::Client as TokioXmppClient; pub struct Agent { pub(crate) client: TokioXmppClient, diff --git a/xmpp/src/message/send.rs b/xmpp/src/message/send.rs index e8c14cd2..3098a5cb 100644 --- a/xmpp/src/message/send.rs +++ b/xmpp/src/message/send.rs @@ -5,9 +5,9 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use crate::{ + jid::{BareJid, Jid}, minidom::Element, parsers::message::{Body, Message, MessagePayload, MessageType}, - tokio_xmpp::jid::{BareJid, Jid}, }; use crate::Agent; diff --git a/xmpp/src/muc/private_message.rs b/xmpp/src/muc/private_message.rs index 78908d08..13929f42 100644 --- a/xmpp/src/muc/private_message.rs +++ b/xmpp/src/muc/private_message.rs @@ -5,9 +5,9 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use crate::{ + jid::{BareJid, Jid}, message::send::RawMessageSettings, parsers::{message::MessageType, muc::user::MucUser}, - tokio_xmpp::jid::{BareJid, Jid}, Agent, RoomNick, }; diff --git a/xmpp/src/muc/room.rs b/xmpp/src/muc/room.rs index c9d48226..9b79ff70 100644 --- a/xmpp/src/muc/room.rs +++ b/xmpp/src/muc/room.rs @@ -4,18 +4,17 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. -use crate::parsers::message::MessageType; -use tokio_xmpp::{ +use crate::{ jid::{BareJid, ResourcePart, ResourceRef}, + message::send::RawMessageSettings, parsers::{ + message::MessageType, muc::Muc, presence::{Presence, Type as PresenceType}, }, + Agent, }; -use crate::message::send::RawMessageSettings; -use crate::Agent; - #[derive(Clone, Debug)] pub struct JoinRoomSettings<'a> { pub room: BareJid,