update deps

This commit is contained in:
Astro 2017-08-24 19:54:33 +02:00
parent b83905dc96
commit a92e7a0ff7
2 changed files with 6 additions and 6 deletions

View file

@ -10,14 +10,14 @@ tokio-io = "*"
bytes = "0.4.4" bytes = "0.4.4"
xml5ever = "*" xml5ever = "*"
tendril = "*" tendril = "*"
minidom = "0.6.0" minidom = "0.6.1"
native-tls = "*" native-tls = "*"
tokio-tls = "*" tokio-tls = "*"
sasl = "*" sasl = "*"
rustc-serialize = "*" rustc-serialize = "*"
jid = { version = "0.2.3", features = ["minidom"] } jid = { version = "0.3.0", features = ["minidom"] }
domain = "0.2.1" domain = "0.2.1"
xmpp-parsers = "0.7.0" xmpp-parsers = "0.7.2"
idna = "*" idna = "*"
try_from = "0.2.2" try_from = "0.2.2"
sha-1 = "0.4.1" sha-1 = "0.4.1"

View file

@ -15,7 +15,7 @@ use futures::{Future, Stream, Sink, future};
use tokio_xmpp::Component; use tokio_xmpp::Component;
use minidom::Element; use minidom::Element;
use xmpp_parsers::presence::{Presence, Type as PresenceType, Show as PresenceShow}; use xmpp_parsers::presence::{Presence, Type as PresenceType, Show as PresenceShow};
use xmpp_parsers::message::{Message, MessageType}; use xmpp_parsers::message::{Message, MessageType, Body};
use jid::Jid; use jid::Jid;
fn main() { fn main() {
@ -66,7 +66,7 @@ fn main() {
match (message.from, message.bodies.get("")) { match (message.from, message.bodies.get("")) {
(Some(from), Some(body)) => (Some(from), Some(body)) =>
if message.type_ != MessageType::Error { if message.type_ != MessageType::Error {
let reply = make_reply(from, body); let reply = make_reply(from, &body.0);
send(reply); send(reply);
}, },
_ => (), _ => (),
@ -99,6 +99,6 @@ fn make_presence(from: Jid, to: Jid) -> Element {
// Construct a chat <message/> // Construct a chat <message/>
fn make_reply(to: Jid, body: &str) -> Element { fn make_reply(to: Jid, body: &str) -> Element {
let mut message = Message::new(Some(to)); let mut message = Message::new(Some(to));
message.bodies.insert(String::new(), body.to_owned()); message.bodies.insert(String::new(), Body(body.to_owned()));
message.into() message.into()
} }