mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
Fix bug where ContactAdded event was not firing due to a bad if statement.
This commit is contained in:
parent
88ab74c92f
commit
209c5b779a
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue