aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-08-31 15:54:53 +0200
committeriNPUTmice <daniel@gultsch.de>2014-08-31 15:54:53 +0200
commit1cc16161ef6c4e504354738bf0b267355d86e8c2 (patch)
treedf527a6fc5f9594099e01b07d592464d9a8300be /src/eu
parent8f8d4e320da81ef34dc7e2af840e280f112eeb4a (diff)
require encrypted to be the same for messages to get merged
Diffstat (limited to 'src/eu')
-rw-r--r--src/eu/siacs/conversations/entities/Message.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java
index 48473afe..09beff52 100644
--- a/src/eu/siacs/conversations/entities/Message.java
+++ b/src/eu/siacs/conversations/entities/Message.java
@@ -315,8 +315,10 @@ public class Message extends AbstractEntity {
if (message == null) {
return false;
}
- return (this.getType() == Message.TYPE_TEXT
+ return (message.getType() == Message.TYPE_TEXT
+ && message.getEncryption() != Message.ENCRYPTION_PGP
&& this.getType() == message.getType()
+ && this.getEncryption() == message.getEncryption()
&& this.getCounterpart().equals(message.getCounterpart())
&& (message.getTimeSent() - this.getTimeSent()) <= 20000 && ((this
.getStatus() == message.getStatus()) || (this.getStatus() == Message.STATUS_SEND && message