Skip to content

Commit

Permalink
Bug fixes to extdisco after testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed May 26, 2021
1 parent 9f3eff0 commit 3b9971d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/xmpp/xmpp-im/xmpp_externalservicediscovery.cpp
Expand Up @@ -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;
}
Expand All @@ -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;
}

Expand Down Expand Up @@ -137,6 +137,7 @@ void ExternalServiceDiscovery::services(QObject *ctx, ServicesCallback &&callbac
cb(services_);
});
task->getServices(type);
task->go(true);
}

} // namespace XMPP

0 comments on commit 3b9971d

Please sign in to comment.