bool Xep0313Manager::handleStanza (const QDomElement& element) { if (element.tagName () == "iq") { if (element.firstChildElement ("prefs").namespaceURI () == NsMam) { HandlePrefs (element); return true; } else if (element.firstChildElement ("query").namespaceURI () == NsMam && element.attribute ("type") == "result") { HandleHistoryQueryFinished (element); return true; } } return false; }
bool Xep0313Manager::handleStanza (const QDomElement& element) { const auto& tagName = element.tagName (); if (tagName == "iq") { if (element.firstChildElement ("prefs").namespaceURI () == NsMam) { HandlePrefs (element); return true; } else if (element.firstChildElement ("query").namespaceURI () == NsMam && element.attribute ("type") == "result") { HandleHistoryQueryFinished (element); return true; } } else if (tagName == "message") { const auto& res = element.firstChildElement ("result"); if (res.namespaceURI () == NsMam) { HandleMessage (res); return true; } const auto& fin = element.firstChildElement ("fin"); if (fin.namespaceURI () == NsMam) { HandleHistoryQueryFinished (fin); return true; } } return false; }