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:
parent
e70cf97056
commit
3c15909ffc
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user