require encrypted to be the same for messages to get merged

This commit is contained in:
iNPUTmice 2014-08-31 15:54:53 +02:00
parent 8f8d4e320d
commit 1cc16161ef
1 changed files with 3 additions and 1 deletions

View File

@ -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