Fixed message stored one time in clear and one time encrypted if using asynchronism while encrypting

This commit is contained in:
Sylvain Berfini 2018-02-28 16:13:08 +01:00
parent eaa7804d81
commit d41dba6357

View file

@ -582,7 +582,7 @@ void ChatMessagePrivate::send () {
currentSendStep |= ChatMessagePrivate::Step::Started;
if (toBeStored)
if (toBeStored || currentSendStep == (ChatMessagePrivate::Step::Started | ChatMessagePrivate::Step::None))
storeInDb();
if ((currentSendStep & ChatMessagePrivate::Step::FileUpload) == ChatMessagePrivate::Step::FileUpload) {