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-15 16:34:55 +0200
commitcbfd07d58077efb8fda7a0beae09cad3931a3030 (patch)
treef4f4ce58b3a15fe53fe607dbfe89765d21cc810d
parent235c9039e010e26bf3046fd2ae36b4d45c39cf8e (diff)
Don't merge messages with different trust statuses
-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 ac770f9e..a85a52ea 100644
--- a/src/main/java/eu/siacs/conversations/entities/Message.java
+++ b/src/main/java/eu/siacs/conversations/entities/Message.java
@@ -389,7 +389,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()
);
}
@@ -669,4 +670,9 @@ public class Message extends AbstractEntity {
public String getAxolotlFingerprint() {
return axolotlFingerprint;
}
+
+ public boolean isTrusted() {
+ return conversation.getAccount().getAxolotlService().getFingerprintTrust(axolotlFingerprint)
+ == AxolotlService.SQLiteAxolotlStore.Trust.TRUSTED;
+ }
}