diff --git a/xmpp/src/lib.rs b/xmpp/src/lib.rs index 034db7f..21b5f0b 100644 --- a/xmpp/src/lib.rs +++ b/xmpp/src/lib.rs @@ -299,7 +299,7 @@ impl Agent { } else if let IqType::Result(Some(payload)) = iq.payload { // TODO: move private iqs like this one somewhere else, for // security reasons. - if payload.is("query", ns::ROSTER) && iq.from.is_none() { + if payload.is("query", ns::ROSTER) && Some(from.clone()) == iq.from { let roster = Roster::try_from(payload).unwrap(); for item in roster.items.into_iter() { events.push(Event::ContactAdded(item));