From 3c15909ffcc7a6c9c7d7631e75dcf82614acc0cc Mon Sep 17 00:00:00 2001 From: apprb Date: Wed, 3 Dec 2014 23:47:07 +0600 Subject: [PATCH] correct displaying of the targeted messages --- src/widget/form/genericchatform.cpp | 2 +- src/widget/widget.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widget/form/genericchatform.cpp b/src/widget/form/genericchatform.cpp index 6dea94104..d9912a091 100644 --- a/src/widget/form/genericchatform.cpp +++ b/src/widget/form/genericchatform.cpp @@ -229,7 +229,7 @@ void GenericChatForm::addAlertMessage(const ToxID &author, QString message, QDat authorStr = author.publicKey; QString date = datetime.toString(Settings::getInstance().getTimestampFormat()); - MessageActionPtr ca = MessageActionPtr(new AlertAction(authorStr, message, date)); + MessageActionPtr ca = MessageActionPtr(new AlertAction(getElidedName(authorStr), message, date)); ca->markAsSent(); chatWidget->insertMessage(ca); previousId = author; diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index b044c8c25..4736f3642 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -956,7 +956,7 @@ void Widget::onGroupMessageReceived(int groupnumber, int peernumber, const QStri QString name = core->getUsername(); bool targeted = (!author.isMine()) && message.contains(name, Qt::CaseInsensitive); - if (targeted) + if (targeted && !isAction) g->getChatForm()->addAlertMessage(author, message, QDateTime::currentDateTime()); else g->getChatForm()->addMessage(author, message, isAction, QDateTime::currentDateTime(), true);