Update to xmpp 0.6
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
ac67c52bee
commit
7b63e24168
3 changed files with 9 additions and 7 deletions
|
@ -14,14 +14,14 @@ hyper = { version = "1.4", default-features = false, features = [ "http1", "serv
|
|||
hyper-util = { version = "0.1", features = [ "tokio" ] }
|
||||
http-body-util = "0.1"
|
||||
bytes = "1.6"
|
||||
jid = { version = "0.10", features = [ "serde" ] }
|
||||
log = "0.4"
|
||||
tokio = { version = "1", default-features = false, features = [ "rt", "net", "sync", "fs" ] }
|
||||
tokio-xmpp = { version = "4.0.0", default-features = false }
|
||||
pretty_env_logger = "0.5"
|
||||
serde = { version = "1.0", features = [ "derive" ] }
|
||||
serde_json = "1.0"
|
||||
toml = "0.8"
|
||||
xmpp = "0.5"
|
||||
xmpp = { version = "0.6", default-features = false, features = [ "serde", "starttls-native"] }
|
||||
hmac = "0.12"
|
||||
sha2 = "0.10"
|
||||
hex = "0.4"
|
||||
|
|
10
src/bot.rs
10
src/bot.rs
|
@ -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")
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue