diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-08-23 15:57:39 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-08-23 15:57:39 +0200 |
commit | f7437ecc360b8ceb2ac976172831034a7c5e4260 (patch) | |
tree | f8cf52d2bea46d9a7e2f1e926a601c39cca0a7af /src/eu/siacs/conversations/entities/Message.java | |
parent | ee9872277dd83e3109633bd7b59a962555e663b5 (diff) |
experimental muc message deduplication
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/entities/Message.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java index b669efc5a..6d70b66dd 100644 --- a/src/eu/siacs/conversations/entities/Message.java +++ b/src/eu/siacs/conversations/entities/Message.java @@ -275,4 +275,12 @@ public class Message extends AbstractEntity { public void setCounterpart(String counterpart) { this.counterpart = counterpart; } + + public boolean equals(Message message) { + if ((this.remoteMsgId!=null) && (this.body != null) && (this.counterpart != null)) { + return this.remoteMsgId.equals(message.getRemoteMsgId()) && this.body.equals(message.getBody()) && this.counterpart.equals(message.getCounterpart()); + } else { + return false; + } + } } |