Fixed sent message getText() and getContentType() values

This commit is contained in:
Sylvain Berfini 2017-10-30 15:17:26 +01:00
parent 637595573d
commit 3b4e32cb8e

View file

@ -1201,11 +1201,11 @@ void ChatMessagePrivate::send() {
}
//TODO Remove : This won't be necessary once we store the contentsList
if (!getText().empty() && getText() == clearTextMessage) {
if (!getText().empty() && getText() != clearTextMessage) {
/* We replace the encrypted message by the original one so it can be correctly stored and displayed by the application */
setText(clearTextMessage);
}
if (getContentType().isValid() && (getContentType() == clearTextContentType)) {
if (getContentType().isValid() && (getContentType() != clearTextContentType)) {
/* We replace the encrypted content type by the original one */
setContentType(clearTextContentType);
}