From 3b9971d1962866279f0f7bf893b22a04ee0b0122 Mon Sep 17 00:00:00 2001 From: Sergey Ilinykh Date: Wed, 26 May 2021 20:31:38 +0300 Subject: [PATCH] Bug fixes to extdisco after testing --- src/xmpp/xmpp-im/xmpp_externalservicediscovery.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xmpp/xmpp-im/xmpp_externalservicediscovery.cpp b/src/xmpp/xmpp-im/xmpp_externalservicediscovery.cpp index a8f56bb5..3184700c 100644 --- a/src/xmpp/xmpp-im/xmpp_externalservicediscovery.cpp +++ b/src/xmpp/xmpp-im/xmpp_externalservicediscovery.cpp @@ -92,7 +92,7 @@ bool ExternalService::parse(QDomElement &el) return false; if (!expiresOpt.isEmpty()) { - expires = QDateTime::fromString(el.text().left(19), Qt::ISODate); + expires = QDateTime::fromString(expiresOpt.left(19), Qt::ISODate); if (!expires.isValid()) return false; } @@ -107,9 +107,9 @@ bool ExternalService::parse(QDomElement &el) return false; if (!restrictedOpt.isEmpty()) { - if (restrictedOpt == QLatin1String("true")) + if (restrictedOpt == QLatin1String("true") || restrictedOpt == QLatin1String("1")) restricted = true; - if (restrictedOpt != QLatin1String("false")) + else if (restrictedOpt != QLatin1String("false") && restrictedOpt != QLatin1String("0")) return false; } @@ -137,6 +137,7 @@ void ExternalServiceDiscovery::services(QObject *ctx, ServicesCallback &&callbac cb(services_); }); task->getServices(type); + task->go(true); } } // namespace XMPP