aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppOutgoingClient.cpp
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2023-03-17 17:24:52 +0100
committerLinus Jahn <lnj@kaidan.im>2023-03-17 17:24:52 +0100
commit55362b2e36f91282ccfbdd2bd5a9bba1d50c2002 (patch)
treea0d6193add779507821defb2ebe9e9f8d8405628 /src/client/QXmppOutgoingClient.cpp
parentd679ad1c49eeb28be2ac3a75bd7fd1a9be24d483 (diff)
parent1cf0a4aff856a1f3cab0f9750ee6b361691350a7 (diff)
Merge branch '1.5'
Diffstat (limited to 'src/client/QXmppOutgoingClient.cpp')
-rw-r--r--src/client/QXmppOutgoingClient.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/QXmppOutgoingClient.cpp b/src/client/QXmppOutgoingClient.cpp
index 046bdcf2..19895938 100644
--- a/src/client/QXmppOutgoingClient.cpp
+++ b/src/client/QXmppOutgoingClient.cpp
@@ -324,11 +324,9 @@ bool QXmppOutgoingClient::isStreamResumed() const
///
QXmppTask<QXmppStream::IqResult> 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));
+ // If 'to' is empty the user's bare JID is meant implicitly (see RFC6120, section 10.3.3.).
+ auto to = iq.to();
+ return QXmppStream::sendIq(std::move(iq), to.isEmpty() ? d->config.jidBare() : to);
}
void QXmppOutgoingClient::_q_socketDisconnected()