aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Straub <andy@strb.org>2015-07-15 15:45:12 +0200
committerAndreas Straub <andy@strb.org>2015-07-19 22:23:28 +0200
commite8ec2ee628076aa43132c3214b786ddde64f93a6 (patch)
tree69b2a4d3b926d37e49f3051a3afaf7bc2380854b
parentfca0c367576e4cd1f218c663ad2da6a1d4bfb392 (diff)
Don't merge messages with different trust statuses
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Message.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java
index ac6c6625..698775c8 100644
--- a/src/main/java/eu/siacs/conversations/entities/Message.java
+++ b/src/main/java/eu/siacs/conversations/entities/Message.java
@@ -399,7 +399,8 @@ public class Message extends AbstractEntity {
!message.getBody().startsWith(ME_COMMAND) &&
!this.getBody().startsWith(ME_COMMAND) &&
!this.bodyIsHeart() &&
- !message.bodyIsHeart()
+ !message.bodyIsHeart() &&
+ this.isTrusted() == message.isTrusted()
);
}
@@ -679,4 +680,9 @@ public class Message extends AbstractEntity {
public String getAxolotlFingerprint() {
return axolotlFingerprint;
}
+
+ public boolean isTrusted() {
+ return conversation.getAccount().getAxolotlService().getFingerprintTrust(axolotlFingerprint)
+ == AxolotlService.SQLiteAxolotlStore.Trust.TRUSTED;
+ }
}