|
|
|
@ -212,12 +212,15 @@ ChatMessage::Ptr GenericChatForm::addMessage(const ToxID& author, const QString
@@ -212,12 +212,15 @@ ChatMessage::Ptr GenericChatForm::addMessage(const ToxID& author, const QString
|
|
|
|
|
if(isAction) |
|
|
|
|
{ |
|
|
|
|
msg = ChatMessage::createChatMessage(authorStr, message, true, false, false); |
|
|
|
|
previousId.clear(); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
msg = ChatMessage::createChatMessage(authorStr, message, false, false, author.isMine()); |
|
|
|
|
if(author == previousId) |
|
|
|
|
msg->hideSender(); |
|
|
|
|
|
|
|
|
|
previousId = author; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
insertChatMessage(msg); |
|
|
|
@ -225,8 +228,6 @@ ChatMessage::Ptr GenericChatForm::addMessage(const ToxID& author, const QString
@@ -225,8 +228,6 @@ ChatMessage::Ptr GenericChatForm::addMessage(const ToxID& author, const QString
|
|
|
|
|
if(isSent) |
|
|
|
|
msg->markAsSent(datetime); |
|
|
|
|
|
|
|
|
|
previousId = author; |
|
|
|
|
|
|
|
|
|
return msg; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|