Merge branch 'stanza-debug' into 'master'
Enable stanza_debug automatically when STANZA_DEBUG is set in the env See merge request !21
This commit is contained in:
commit
a5f87494c2
1 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,7 @@ extern crate xmpp;
|
|||
|
||||
use xmpp::jid::Jid;
|
||||
use xmpp::client::ClientBuilder;
|
||||
use xmpp::plugins::stanza_debug::StanzaDebugPlugin;
|
||||
use xmpp::plugins::stanza::StanzaPlugin;
|
||||
use xmpp::plugins::unhandled_iq::UnhandledIqPlugin;
|
||||
use xmpp::plugins::messaging::{MessagingPlugin, MessageEvent};
|
||||
|
@ -20,6 +21,9 @@ fn main() {
|
|||
.password(pass)
|
||||
.connect()
|
||||
.unwrap();
|
||||
if env::var("STANZA_DEBUG").is_ok() {
|
||||
client.register_plugin(StanzaDebugPlugin::new());
|
||||
}
|
||||
client.register_plugin(StanzaPlugin::new());
|
||||
client.register_plugin(UnhandledIqPlugin::new());
|
||||
client.register_plugin(MessagingPlugin::new());
|
||||
|
|
Loading…
Reference in a new issue