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

correct displaying of the targeted messages

This commit is contained in:
apprb 2014-12-03 23:47:07 +06:00
parent e70cf97056
commit 3c15909ffc
No known key found for this signature in database
GPG Key ID: B001911B5B22FB9B
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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);