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 4806e684fa
commit 7179ed4722
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -129,14 +129,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();