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:
parent
8b671916ab
commit
698fd06972
|
@ -128,14 +128,16 @@ Ignore the proxy and connect to the Internet directly?"), QMessageBox::Yes|QMess
|
||||||
return;
|
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())
|
if (toxId.toString().isEmpty())
|
||||||
{
|
{
|
||||||
GUI::showWarning(tr("Couldn't add friend"), tr("This Tox ID does not exist","DNS error"));
|
GUI::showWarning(tr("Couldn't add friend"), tr("This Tox ID does not exist","DNS error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
emit friendRequested(toxId.toString(), getMessage());
|
emit friendRequested(toxId.toString(), getMessage());
|
||||||
this->toxId.clear();
|
this->toxId.clear();
|
||||||
this->message.clear();
|
this->message.clear();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user