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

Add Toxme lookup support

qTox will try Toxme, and if Toxme not supported, ToxDNS
This commit is contained in:
Diadlo 2015-12-30 23:00:20 +03:00 committed by tux3
parent 8b671916ab
commit 698fd06972
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -128,14 +128,16 @@ Ignore the proxy and connect to the Internet directly?"), QMessageBox::Yes|QMess
return;
}
ToxId toxId = ToxDNS::resolveToxAddress(id, true);
ToxId toxId = Toxme::lookup(id); // Try Toxme
if (toxId.toString().isEmpty()) // If it isn't supported
{
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();