From 7bfb39fe1eb853a95929c16a2692cbb648d7387c Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Tue, 14 Mar 2023 23:17:55 +0100 Subject: Client: Don't fill empty 'to' attributes of outgoing IQs --- src/client/QXmppOutgoingClient.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/client/QXmppOutgoingClient.cpp') diff --git a/src/client/QXmppOutgoingClient.cpp b/src/client/QXmppOutgoingClient.cpp index 20e88b9c..53c02e41 100644 --- a/src/client/QXmppOutgoingClient.cpp +++ b/src/client/QXmppOutgoingClient.cpp @@ -328,11 +328,8 @@ bool QXmppOutgoingClient::isStreamResumed() const /// QXmppTask QXmppOutgoingClient::sendIq(QXmppIq &&iq) { - // always set a to address (the QXmppStream needs this for matching) - if (iq.to().isEmpty()) { - iq.setTo(d->config.domain()); - } - return QXmppStream::sendIq(std::move(iq)); + auto to = iq.to(); + return QXmppStream::sendIq(std::move(iq), to.isEmpty() ? d->config.domain() : to); } void QXmppOutgoingClient::_q_socketDisconnected() -- cgit v1.2.3