aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/QXmppDiscoveryManager.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/QXmppDiscoveryManager.cpp b/src/client/QXmppDiscoveryManager.cpp
index 8b0e207d..0bd588b0 100644
--- a/src/client/QXmppDiscoveryManager.cpp
+++ b/src/client/QXmppDiscoveryManager.cpp
@@ -256,6 +256,9 @@ bool QXmppDiscoveryManager::handleStanza(const QDomElement &element)
QXmppDiscoveryIq receivedIq;
receivedIq.parse(element);
+ const bool isReplyType = receivedIq.type() == QXmppIq::Result ||
+ receivedIq.type() == QXmppIq::Error;
+
if(receivedIq.type() == QXmppIq::Get &&
receivedIq.queryType() == QXmppDiscoveryIq::InfoQuery &&
(receivedIq.queryNode().isEmpty() ||
@@ -266,11 +269,11 @@ bool QXmppDiscoveryManager::handleStanza(const QDomElement &element)
qxmppFeatures.setTo(receivedIq.from());
qxmppFeatures.setQueryNode(receivedIq.queryNode());
client()->sendPacket(qxmppFeatures);
- } else if(receivedIq.type() == QXmppIq::Result &&
+ } else if(isReplyType &&
receivedIq.queryType() == QXmppDiscoveryIq::InfoQuery) {
// info result
emit infoReceived(receivedIq);
- } else if(receivedIq.type() == QXmppIq::Result &&
+ } else if(isReplyType &&
receivedIq.queryType() == QXmppDiscoveryIq::ItemsQuery) {
// items result
emit itemsReceived(receivedIq);