From a8c64e1d4ac86032e6d921eda3f10e99a35b448d Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 27 May 2017 20:43:08 +0100 Subject: [PATCH] fix some propagation issues --- src/plugins/ping.rs | 3 ++- src/plugins/stanza.rs | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/ping.rs b/src/plugins/ping.rs index e798bf0..7c3fe77 100644 --- a/src/plugins/ping.rs +++ b/src/plugins/ping.rs @@ -49,9 +49,10 @@ impl PingPlugin { from: iq.from.unwrap(), id: iq.id.unwrap(), }); + return Propagation::Stop; } } - Propagation::Stop + Propagation::Continue } fn reply_ping(&self, ping: &PingEvent) -> Propagation { diff --git a/src/plugins/stanza.rs b/src/plugins/stanza.rs index 0924e5c..7bc6aba 100644 --- a/src/plugins/stanza.rs +++ b/src/plugins/stanza.rs @@ -38,6 +38,9 @@ impl StanzaPlugin { } else if elem.is("iq", ns::CLIENT) { let iq = Iq::try_from(elem).unwrap(); self.proxy.dispatch(iq); + } else { + // TODO: handle nonzas too. + return Propagation::Continue; } Propagation::Stop