From 209c5b779a545a9ec114295f08688b7d0ef3d9e2 Mon Sep 17 00:00:00 2001 From: Doggo Date: Mon, 15 May 2023 12:33:43 +0000 Subject: [PATCH] Fix bug where ContactAdded event was not firing due to a bad if statement. --- xmpp/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmpp/src/lib.rs b/xmpp/src/lib.rs index 034db7fc..21b5f0bc 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));