diff options
Diffstat (limited to 'src/client/QXmppIqHandling.h')
| -rw-r--r-- | src/client/QXmppIqHandling.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/QXmppIqHandling.h b/src/client/QXmppIqHandling.h index 0782dd89..7535bc30 100644 --- a/src/client/QXmppIqHandling.h +++ b/src/client/QXmppIqHandling.h @@ -22,6 +22,8 @@ namespace Private { const std::optional<QXmppE2eeMetadata> &e2eeMetadata, QXmppIq &&iq); + QXMPP_EXPORT std::tuple<bool, QString, QString> checkIsIqRequest(const QDomElement &el); + template<typename... VariantTypes> void processHandleIqResult(QXmppClient *client, const QString &requestId, @@ -188,11 +190,7 @@ bool handleIqRequests(const QDomElement &element, QXmppClient *client, Handler handler) { - if (element.tagName() == "iq") { - auto queryElement = element.firstChildElement(); - auto tagName = queryElement.tagName(); - auto xmlns = queryElement.namespaceURI(); - + if (auto [isRequest, tagName, xmlns] = Private::checkIsIqRequest(element); isRequest) { return (Private::handleIqType<IqTypes>(handler, client, element, e2eeMetadata, tagName, xmlns) || ...); } return false; |
