aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-12-04 15:34:45 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-12-04 15:34:45 +0100
commit3e3cb047be7f63233f766a022e9cf9ba8827094d (patch)
tree0167431ed221759a8ebe2fd5f78dcc5919c4fb23 /src/main/java
parent242887447c09846f8b4eaeb8a29406e5135ec906 (diff)
rely on message id if message id is uuid and pgp encryption was used to deduplicate messages. fixes #1357
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Message.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java
index b59b0b38..4a49d1b3 100644
--- a/src/main/java/eu/siacs/conversations/entities/Message.java
+++ b/src/main/java/eu/siacs/conversations/entities/Message.java
@@ -361,7 +361,9 @@ public class Message extends AbstractEntity {
if (message.getRemoteMsgId() != null) {
return (message.getRemoteMsgId().equals(this.remoteMsgId) || message.getRemoteMsgId().equals(this.uuid))
&& this.counterpart.equals(message.getCounterpart())
- && body.equals(otherBody);
+ && (body.equals(otherBody)
+ ||(message.getEncryption() == Message.ENCRYPTION_PGP
+ && message.getRemoteMsgId().matches("[0-9a-f]{8}-[0-9a-f]{4}-4[0-9]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"))) ;
} else {
return this.remoteMsgId == null
&& this.counterpart.equals(message.getCounterpart())