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

replace @ with ._tox.

This commit is contained in:
marcel 2014-06-30 20:33:43 +02:00
parent 8b34315f49
commit 58cf040de9

View File

@ -69,13 +69,14 @@ QString AddFriendForm::getMessage() const
void AddFriendForm::onSendTriggered() void AddFriendForm::onSendTriggered()
{ {
const QString id = toxId.text().trimmed(); QString id = toxId.text().trimmed();
if (id.isEmpty()) { if (id.isEmpty()) {
showWarning("Please fill in a valid Tox ID"); showWarning("Please fill in a valid Tox ID");
} else if (isToxId(id)) { } else if (isToxId(id)) {
emit friendRequested(id, getMessage()); emit friendRequested(id, getMessage());
} else { } else {
id = id.replace("@", "._tox.");
dns.setName(id); dns.setName(id);
dns.lookup(); dns.lookup();
} }