Browse Source

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

Fixes #1925
reviewable/pr4183/r1
tux3 9 years ago
parent
commit
1d307bcc0e
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
  1. 14
      src/net/toxuri.cpp

14
src/net/toxuri.cpp

@ -64,13 +64,17 @@ bool handleToxURI(const QString &toxURI) @@ -64,13 +64,17 @@ bool handleToxURI(const QString &toxURI)
QString toxaddr = toxURI.mid(4);
ToxId toxId = Toxme::lookup(toxaddr);
ToxId toxId(toxaddr);
if (!toxId.isValid())
{
QMessageBox::warning(0, "qTox",
ToxURIDialog::tr("%1 is not a valid Toxme address.")
.arg(toxaddr));
return false;
toxId = Toxme::lookup(toxaddr);
if (!toxId.isValid())
{
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?",

Loading…
Cancel
Save