Update to xmpp 0.6

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
xmppftw xmppftw 2024-08-07 10:47:12 +02:00 committed by Maxime “pep” Buquet
commit 7b63e24168
No known key found for this signature in database
GPG key ID: DEDA74AEECA9D0F2
3 changed files with 9 additions and 7 deletions

View file

@ -16,12 +16,14 @@
use crate::hook::{format_hook, GitlabHook};
use log::debug;
use tokio_xmpp::starttls::ServerConfig;
use xmpp::jid::{BareJid, Jid};
use xmpp::parsers::message::MessageType;
use xmpp::{Agent, BareJid, ClientBuilder, ClientFeature, ClientType, Event, Jid};
use xmpp::{Agent, ClientBuilder, ClientFeature, ClientType, Event};
pub struct XmppClient {
is_online: bool,
agent: Agent,
agent: Agent<ServerConfig>,
rooms: Vec<BareJid>,
nickname: String,
}
@ -63,9 +65,9 @@ impl XmppClient {
.await
}
}
Event::Disconnected => {
Event::Disconnected(e) => {
self.is_online = false;
debug!("XMPP Disconnected");
debug!("XMPP Disconnected: {e}");
}
_ => {
debug!("XMPP Event not supported")

View file

@ -17,9 +17,9 @@ use std::io::{Error as IoError, ErrorKind as IoErrorKind};
use std::net::{IpAddr, Ipv6Addr, SocketAddr};
use camino::{Utf8Path, Utf8PathBuf};
use jid::BareJid;
use log::debug;
use serde::{Deserialize, Serialize};
use xmpp::jid::BareJid;
use crate::error::Error;