diff options
| -rw-r--r-- | CHANGELOG | 1 | ||||
| -rw-r--r-- | src/client/QXmppDiscoveryManager.cpp | 14 |
2 files changed, 10 insertions, 5 deletions
@@ -6,6 +6,7 @@ QXmpp 0.6.4 (UNRELEASED) * Make it possible to have several e-mail addresses. * Make it possible to have several phone numbers. - Make it possible to set the client's extended information form (XEP-0128). + - Make sure QXmppDiscoveryManager only emits results. - Fix XEP-0115 verification strings (remove duplicate features, sort form values) - Fix issues: * Issue 144: QXmppBookmarkConference autojoin parsing diff --git a/src/client/QXmppDiscoveryManager.cpp b/src/client/QXmppDiscoveryManager.cpp index 778e36e5..9582853b 100644 --- a/src/client/QXmppDiscoveryManager.cpp +++ b/src/client/QXmppDiscoveryManager.cpp @@ -258,19 +258,23 @@ bool QXmppDiscoveryManager::handleStanza(const QDomElement &element) if(receivedIq.type() == QXmppIq::Get && receivedIq.queryType() == QXmppDiscoveryIq::InfoQuery && - (receivedIq.queryNode().isEmpty() || receivedIq.queryNode().startsWith(d->clientCapabilitiesNode))) - { + (receivedIq.queryNode().isEmpty() || + receivedIq.queryNode().startsWith(d->clientCapabilitiesNode))) { // respond to query QXmppDiscoveryIq qxmppFeatures = capabilities(); qxmppFeatures.setId(receivedIq.id()); qxmppFeatures.setTo(receivedIq.from()); qxmppFeatures.setQueryNode(receivedIq.queryNode()); client()->sendPacket(qxmppFeatures); - } - else if(receivedIq.queryType() == QXmppDiscoveryIq::InfoQuery) + } else if(receivedIq.type() == QXmppIq::Result && + receivedIq.queryType() == QXmppDiscoveryIq::InfoQuery) { + // info result emit infoReceived(receivedIq); - else if(receivedIq.queryType() == QXmppDiscoveryIq::ItemsQuery) + } else if(receivedIq.type() == QXmppIq::Result && + receivedIq.queryType() == QXmppDiscoveryIq::ItemsQuery) { + // items result emit itemsReceived(receivedIq); + } return true; } |
