mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-27 19:22:15 -05:00
don't crash when correcting waiting pgp encrypted messages
This commit is contained in:
parent
ad09d7dc49
commit
d2c475d501
@ -1124,10 +1124,18 @@ public class XmppConnectionService extends Service {
|
||||
String decryptedBody = message.getBody();
|
||||
message.setBody(pgpBody);
|
||||
message.setEncryption(Message.ENCRYPTION_PGP);
|
||||
databaseBackend.createMessage(message);
|
||||
saveInDb = false;
|
||||
message.setBody(decryptedBody);
|
||||
message.setEncryption(Message.ENCRYPTION_DECRYPTED);
|
||||
if (message.edited()) {
|
||||
message.setBody(decryptedBody);
|
||||
message.setEncryption(Message.ENCRYPTION_DECRYPTED);
|
||||
databaseBackend.updateMessage(message, message.getEditedId());
|
||||
updateConversationUi();
|
||||
return;
|
||||
} else {
|
||||
databaseBackend.createMessage(message);
|
||||
saveInDb = false;
|
||||
message.setBody(decryptedBody);
|
||||
message.setEncryption(Message.ENCRYPTION_DECRYPTED);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Message.ENCRYPTION_OTR:
|
||||
|
Loading…
Reference in New Issue
Block a user