From 1cc16161ef6c4e504354738bf0b267355d86e8c2 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sun, 31 Aug 2014 15:54:53 +0200 Subject: [PATCH] require encrypted to be the same for messages to get merged --- src/eu/siacs/conversations/entities/Message.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java index 48473afe4..09beff526 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