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

fix(core): ignore mentioning users with empty nicknames

This commit is contained in:
Monsterovich 2018-12-26 19:51:32 +02:00
parent 2000bf55f2
commit 96ad27f644

View File

@ -1742,7 +1742,7 @@ void Widget::onGroupMessageReceived(int groupnumber, int peernumber, const QStri
return;
}
const auto mention = message.contains(nameMention) || message.contains(sanitizedNameMention);
const auto mention = !core->getUsername().isEmpty() && (message.contains(nameMention) || message.contains(sanitizedNameMention));
const auto targeted = !isSelf && mention;
const auto groupId = g->getId();
const auto date = QDateTime::currentDateTime();