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::client::ClientBuilder;
use xmpp::plugins::stanza::StanzaPlugin;
use xmpp::plugins::messaging::{MessagingPlugin, MessageEvent};
use xmpp::plugins::presence::{PresencePlugin, Show};
use xmpp::plugins::ping::{PingPlugin, PingEvent};
@ -15,6 +16,7 @@ fn main() {
.password(pass)
.connect()
.unwrap();
client.register_plugin(StanzaPlugin::new());
client.register_plugin(MessagingPlugin::new());
client.register_plugin(PresencePlugin::new());
client.register_plugin(PingPlugin::new());