1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix: Accept IDs as tox URIs, not just ToxDNS addresses

Fixes #1925
This commit is contained in:
tux3 2017-02-17 03:59:12 +01:00
parent b771f87e0b
commit 1d307bcc0e
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -64,13 +64,17 @@ bool handleToxURI(const QString &toxURI)
QString toxaddr = toxURI.mid(4); QString toxaddr = toxURI.mid(4);
ToxId toxId = Toxme::lookup(toxaddr); ToxId toxId(toxaddr);
if (!toxId.isValid()) if (!toxId.isValid())
{ {
QMessageBox::warning(0, "qTox", toxId = Toxme::lookup(toxaddr);
ToxURIDialog::tr("%1 is not a valid Toxme address.") if (!toxId.isValid())
.arg(toxaddr)); {
return false; QMessageBox::warning(0, "qTox",
ToxURIDialog::tr("%1 is not a valid Toxme address.")
.arg(toxaddr));
return false;
}
} }
ToxURIDialog dialog(0, toxaddr, QObject::tr("%1 here! Tox me maybe?", ToxURIDialog dialog(0, toxaddr, QObject::tr("%1 here! Tox me maybe?",