diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-08-24 13:29:56 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-08-24 13:29:56 +0000 |
| commit | f563a0dcceb2b9a63d2d0a483dde668b5172add9 (patch) | |
| tree | 44e36f64f658cbd0393ef9893bcd11f7c1808b6f /src/QXmppIncomingClient.cpp | |
| parent | be8cbbda831ead579f40e87fe9d103a9c6394521 (diff) | |
| download | qxmpp-f563a0dcceb2b9a63d2d0a483dde668b5172add9.tar.gz | |
when an element is received from a client without a "to", set the "to" to the local domain
Diffstat (limited to 'src/QXmppIncomingClient.cpp')
| -rw-r--r-- | src/QXmppIncomingClient.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/QXmppIncomingClient.cpp b/src/QXmppIncomingClient.cpp index 1e9cd3e5..1a8f4f3c 100644 --- a/src/QXmppIncomingClient.cpp +++ b/src/QXmppIncomingClient.cpp @@ -285,6 +285,9 @@ void QXmppIncomingClient::handleStanza(const QDomElement &nodeRecv) { QDomElement nodeFull(nodeRecv); nodeFull.setAttribute("from", jid()); + // if the recipient is empty, set it to the local domain + if (nodeFull.attribute("to").isEmpty()) + nodeFull.setAttribute("to", d->domain); bool handled = false; emit elementReceived(nodeFull, handled); } @@ -293,6 +296,9 @@ void QXmppIncomingClient::handleStanza(const QDomElement &nodeRecv) { QDomElement nodeFull(nodeRecv); nodeFull.setAttribute("from", jid()); + // if the recipient is empty, set it to the local domain + if (nodeFull.attribute("to").isEmpty()) + nodeFull.setAttribute("to", d->domain); bool handled = false; emit elementReceived(nodeFull, handled); } |
