From 51f2462772f9d885cb668ea9f10a119f4d65b7b1 Mon Sep 17 00:00:00 2001 From: xmppftw Date: Sun, 31 Dec 2023 17:54:34 +0100 Subject: [PATCH] When IQ from field is not set, it's user's own bare JID --- xmpp/src/iq/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmpp/src/iq/mod.rs b/xmpp/src/iq/mod.rs index 1709867..54db1bd 100644 --- a/xmpp/src/iq/mod.rs +++ b/xmpp/src/iq/mod.rs @@ -17,7 +17,7 @@ pub async fn handle_iq(agent: &mut Agent, iq: Iq) -> Vec { let from = iq .from .clone() - .unwrap_or_else(|| agent.client.bound_jid().unwrap().clone()); + .unwrap_or_else(|| agent.client.bound_jid().unwrap().to_bare().into()); if let IqType::Get(payload) = iq.payload { get::handle_iq_get(agent, &mut events, from, iq.to, iq.id, payload).await; } else if let IqType::Result(Some(payload)) = iq.payload {