Browse Source

Add Toxme lookup support

qTox will try Toxme, and if Toxme not supported, ToxDNS
reviewable/pr3697/r1
Diadlo 10 years ago committed by tux3
parent
commit
698fd06972
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
  1. 14
      src/widget/form/addfriendform.cpp

14
src/widget/form/addfriendform.cpp

@ -128,14 +128,16 @@ Ignore the proxy and connect to the Internet directly?"), QMessageBox::Yes|QMess @@ -128,14 +128,16 @@ Ignore the proxy and connect to the Internet directly?"), QMessageBox::Yes|QMess
return;
}
ToxId toxId = ToxDNS::resolveToxAddress(id, true);
if (toxId.toString().isEmpty())
ToxId toxId = Toxme::lookup(id); // Try Toxme
if (toxId.toString().isEmpty()) // If it isn't supported
{
GUI::showWarning(tr("Couldn't add friend"), tr("This Tox ID does not exist","DNS error"));
return;
toxId = ToxDNS::resolveToxAddress(id, true); // Use ToxDNS
if (toxId.toString().isEmpty())
{
GUI::showWarning(tr("Couldn't add friend"), tr("This Tox ID does not exist","DNS error"));
return;
}
}
emit friendRequested(toxId.toString(), getMessage());
this->toxId.clear();
this->message.clear();

Loading…
Cancel
Save