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 {
|
} else if let IqType::Result(Some(payload)) = iq.payload {
|
||||||
// TODO: move private iqs like this one somewhere else, for
|
// TODO: move private iqs like this one somewhere else, for
|
||||||
// security reasons.
|
// 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();
|
let roster = Roster::try_from(payload).unwrap();
|
||||||
for item in roster.items.into_iter() {
|
for item in roster.items.into_iter() {
|
||||||
events.push(Event::ContactAdded(item));
|
events.push(Event::ContactAdded(item));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue