mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
initialise the StanzaPlugin in the client example
This commit is contained in:
parent
c326d5b07e
commit
406dfdea98
1 changed files with 2 additions and 0 deletions
|
@ -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());
|
||||||
|
|
Loading…
Reference in a new issue