mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 20:52:21 -05:00
synchronize message body changes for message correction
This commit is contained in:
parent
f8b1e8098c
commit
1eb776f39c
@ -104,6 +104,7 @@ public class PgpDecryptionService {
|
||||
}
|
||||
|
||||
private void executeApi(Message message) {
|
||||
synchronized (message) {
|
||||
Intent params = new Intent();
|
||||
params.setAction(OpenPgpApi.ACTION_DECRYPT_VERIFY);
|
||||
if (message.getType() == Message.TYPE_TEXT) {
|
||||
@ -174,6 +175,7 @@ public class PgpDecryptionService {
|
||||
mXmppConnectionService.updateMessage(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
notifyIfPending(message);
|
||||
}
|
||||
|
||||
|
@ -468,6 +468,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
||||
&& replacedMessage.getTrueCounterpart().equals(message.getTrueCounterpart());
|
||||
if (fingerprintsMatch && (trueCountersMatch || !conversationMultiMode)) {
|
||||
Log.d(Config.LOGTAG, "replaced message '" + replacedMessage.getBody() + "' with '" + message.getBody() + "'");
|
||||
synchronized (replacedMessage) {
|
||||
final String uuid = replacedMessage.getUuid();
|
||||
replacedMessage.setUuid(UUID.randomUUID().toString());
|
||||
replacedMessage.setBody(message.getBody());
|
||||
@ -486,6 +487,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
||||
conversation.getAccount().getPgpDecryptionService().discard(replacedMessage);
|
||||
conversation.getAccount().getPgpDecryptionService().decrypt(replacedMessage, false);
|
||||
}
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
Log.d(Config.LOGTAG,account.getJid().toBareJid()+": received message correction but verification didn't check out");
|
||||
|
Loading…
Reference in New Issue
Block a user