Skip to content
Snippets Groups Projects
Unverified Commit 5cc6ed66 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

callbackshandler: handle @ring.dht uri for all contacts

And be prepared to sha256

Change-Id: Ib2338034ba9e362f9b129d09728929a3fd85c703
parent db54e18b
Branches
No related tags found
No related merge requests found
......@@ -256,7 +256,7 @@ CallbacksHandler::slotNewAccountMessage(const QString& accountId,
}
auto accountId2 = accountId.toStdString();
auto from2 = from.toStdString();
auto from2 = QString(from).replace("@ring.dht", "").toStdString();
emit newAccountMessage(accountId2, from2, stdPayloads);
}
......@@ -385,10 +385,9 @@ CallbacksHandler::slotIncomingMessage(const QString& callId,
const QMap<QString,QString>& interaction)
{
std::string from2;
if (from.contains("ring.dht")) {
from2 = from.left(40).toStdString();
}
else {
if (from.contains("@ring.dht")) {
from2 = QString(from).replace("@ring.dht", "").toStdString();
} else {
auto left = from.indexOf(":")+1;
auto right = from.indexOf("@");
from2 = from.mid(left, right-left).toStdString();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment