account for downloaded http files in dup checker
This commit is contained in:
parent
aa1b9de20c
commit
ce527c8b76
|
@ -321,15 +321,25 @@ public class Message extends AbstractEntity {
|
||||||
return this.serverMsgId.equals(message.getServerMsgId());
|
return this.serverMsgId.equals(message.getServerMsgId());
|
||||||
} else if (this.body == null || this.counterpart == null) {
|
} else if (this.body == null || this.counterpart == null) {
|
||||||
return false;
|
return false;
|
||||||
} else if (message.getRemoteMsgId() != null) {
|
|
||||||
return (message.getRemoteMsgId().equals(this.remoteMsgId) || message.getRemoteMsgId().equals(this.uuid))
|
|
||||||
&& this.counterpart.equals(message.getCounterpart())
|
|
||||||
&& this.body.equals(message.getBody());
|
|
||||||
} else {
|
} else {
|
||||||
return this.remoteMsgId == null
|
String body, otherBody;
|
||||||
&& this.counterpart.equals(message.getCounterpart())
|
if (this.hasFileOnRemoteHost()) {
|
||||||
&& this.body.equals(message.getBody())
|
body = getFileParams().url.toString();
|
||||||
&& Math.abs(this.getTimeSent() - message.getTimeSent()) < Config.MESSAGE_MERGE_WINDOW * 1000;
|
otherBody = message.body == null ? null : message.body.trim();
|
||||||
|
} else {
|
||||||
|
body = this.body;
|
||||||
|
otherBody = message.body;
|
||||||
|
}
|
||||||
|
if (message.getRemoteMsgId() != null) {
|
||||||
|
return (message.getRemoteMsgId().equals(this.remoteMsgId) || message.getRemoteMsgId().equals(this.uuid))
|
||||||
|
&& this.counterpart.equals(message.getCounterpart())
|
||||||
|
&& body.equals(otherBody);
|
||||||
|
} else {
|
||||||
|
return this.remoteMsgId == null
|
||||||
|
&& this.counterpart.equals(message.getCounterpart())
|
||||||
|
&& body.equals(otherBody)
|
||||||
|
&& Math.abs(this.getTimeSent() - message.getTimeSent()) < Config.MESSAGE_MERGE_WINDOW * 1000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue