initialise the StanzaPlugin in the client example

This commit is contained in:
Emmanuel Gil Peyrot 2017-05-27 16:25:31 +01:00
parent c326d5b07e
commit 406dfdea98

View file

@ -2,6 +2,7 @@ extern crate xmpp;
use xmpp::jid::Jid; use xmpp::jid::Jid;
use xmpp::client::ClientBuilder; use xmpp::client::ClientBuilder;
use xmpp::plugins::stanza::StanzaPlugin;
use xmpp::plugins::messaging::{MessagingPlugin, MessageEvent}; use xmpp::plugins::messaging::{MessagingPlugin, MessageEvent};
use xmpp::plugins::presence::{PresencePlugin, Show}; use xmpp::plugins::presence::{PresencePlugin, Show};
use xmpp::plugins::ping::{PingPlugin, PingEvent}; use xmpp::plugins::ping::{PingPlugin, PingEvent};
@ -15,6 +16,7 @@ fn main() {
.password(pass) .password(pass)
.connect() .connect()
.unwrap(); .unwrap();
client.register_plugin(StanzaPlugin::new());
client.register_plugin(MessagingPlugin::new()); client.register_plugin(MessagingPlugin::new());
client.register_plugin(PresencePlugin::new()); client.register_plugin(PresencePlugin::new());
client.register_plugin(PingPlugin::new()); client.register_plugin(PingPlugin::new());