mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge branch 'pr889'
This commit is contained in:
commit
1ebcad7ad8
|
@ -229,7 +229,7 @@ void GenericChatForm::addAlertMessage(const ToxID &author, QString message, QDat
|
||||||
authorStr = author.publicKey;
|
authorStr = author.publicKey;
|
||||||
|
|
||||||
QString date = datetime.toString(Settings::getInstance().getTimestampFormat());
|
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();
|
ca->markAsSent();
|
||||||
chatWidget->insertMessage(ca);
|
chatWidget->insertMessage(ca);
|
||||||
previousId = author;
|
previousId = author;
|
||||||
|
|
|
@ -956,7 +956,7 @@ void Widget::onGroupMessageReceived(int groupnumber, int peernumber, const QStri
|
||||||
QString name = core->getUsername();
|
QString name = core->getUsername();
|
||||||
|
|
||||||
bool targeted = (!author.isMine()) && message.contains(name, Qt::CaseInsensitive);
|
bool targeted = (!author.isMine()) && message.contains(name, Qt::CaseInsensitive);
|
||||||
if (targeted)
|
if (targeted && !isAction)
|
||||||
g->getChatForm()->addAlertMessage(author, message, QDateTime::currentDateTime());
|
g->getChatForm()->addAlertMessage(author, message, QDateTime::currentDateTime());
|
||||||
else
|
else
|
||||||
g->getChatForm()->addMessage(author, message, isAction, QDateTime::currentDateTime(), true);
|
g->getChatForm()->addMessage(author, message, isAction, QDateTime::currentDateTime(), true);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user