aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities/Message.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-08-23 15:57:39 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-08-23 15:57:39 +0200
commitf7437ecc360b8ceb2ac976172831034a7c5e4260 (patch)
treef8cf52d2bea46d9a7e2f1e926a601c39cca0a7af /src/eu/siacs/conversations/entities/Message.java
parentee9872277dd83e3109633bd7b59a962555e663b5 (diff)
experimental muc message deduplication
Diffstat (limited to 'src/eu/siacs/conversations/entities/Message.java')
-rw-r--r--src/eu/siacs/conversations/entities/Message.java8
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 b669efc5..6d70b66d 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;
+ }
+ }
}