From 58cf040de93806fdc368faa5d296ecff503b61a5 Mon Sep 17 00:00:00 2001 From: marcel Date: Mon, 30 Jun 2014 20:33:43 +0200 Subject: [PATCH] replace @ with ._tox. --- widget/form/addfriendform.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/form/addfriendform.cpp b/widget/form/addfriendform.cpp index 65591fb01..ae38d2f92 100644 --- a/widget/form/addfriendform.cpp +++ b/widget/form/addfriendform.cpp @@ -69,13 +69,14 @@ QString AddFriendForm::getMessage() const void AddFriendForm::onSendTriggered() { - const QString id = toxId.text().trimmed(); + QString id = toxId.text().trimmed(); if (id.isEmpty()) { showWarning("Please fill in a valid Tox ID"); } else if (isToxId(id)) { emit friendRequested(id, getMessage()); } else { + id = id.replace("@", "._tox."); dns.setName(id); dns.lookup(); }