changed message merger a bit

This commit is contained in:
iNPUTmice 2014-09-21 22:58:19 +02:00
parent 49adf4f69a
commit 98a8fd4d05
1 changed files with 10 additions and 9 deletions

View File

@ -248,7 +248,8 @@ public class Message extends AbstractEntity {
if (presence == null) {
this.counterpart = this.counterpart.split("/", 2)[0];
} else {
this.counterpart = this.counterpart.split("/",2)[0] + "/" + presence;
this.counterpart = this.counterpart.split("/", 2)[0] + "/"
+ presence;
}
}
@ -326,12 +327,12 @@ public class Message extends AbstractEntity {
&& this.getType() == message.getType()
&& this.getEncryption() == message.getEncryption()
&& this.getCounterpart().equals(message.getCounterpart())
&& (message.getTimeSent() - this.getTimeSent()) <= (Config.MESSAGE_MERGE_WINDOW * 1000)
&& ((this.getStatus() == message.getStatus())
|| (this.getStatus() == Message.STATUS_SEND && (message.getStatus() == Message.STATUS_UNSEND
|| message.getStatus() == Message.STATUS_SEND))
|| (this.getStatus() == Message.STATUS_SEND_RECEIVED
&& message.getStatus() == Message.STATUS_SEND_DISPLAYED)));
&& (message.getTimeSent() - this.getTimeSent()) <= (Config.MESSAGE_MERGE_WINDOW * 1000) && ((this
.getStatus() == message.getStatus() || ((this.getStatus() == Message.STATUS_SEND || this
.getStatus() == Message.STATUS_SEND_RECEIVED) && (message
.getStatus() == Message.STATUS_UNSEND
|| message.getStatus() == Message.STATUS_SEND || message
.getStatus() == Message.STATUS_SEND_DISPLAYED)))));
}
public String getMergedBody() {