aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/entities/Message.java
diff options
context:
space:
mode:
authorAndreas Straub <andreas.straub@rwth-aachen.de>2015-06-25 16:56:34 +0200
committerAndreas Straub <andy@strb.org>2015-07-19 21:32:25 +0200
commitf73aa1a2006beb741bc39026bfd10e6166d7951a (patch)
treed69a34e87cdfb880f8ec9ab4ac5bd7fd374d9bc1 /src/main/java/eu/siacs/conversations/entities/Message.java
parent077932eb558853e4c3c3046c54db18c530495d8c (diff)
Reworked axolotl protocol layer
Numerous fixes
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities/Message.java')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Message.java14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java
index b429354b..336af972 100644
--- a/src/main/java/eu/siacs/conversations/entities/Message.java
+++ b/src/main/java/eu/siacs/conversations/entities/Message.java
@@ -8,6 +8,7 @@ import java.net.URL;
import java.util.Arrays;
import eu.siacs.conversations.Config;
+import eu.siacs.conversations.crypto.axolotl.AxolotlService;
import eu.siacs.conversations.utils.GeoHelper;
import eu.siacs.conversations.utils.MimeUtils;
import eu.siacs.conversations.utils.UIHelper;
@@ -34,6 +35,7 @@ public class Message extends AbstractEntity {
public static final int ENCRYPTION_OTR = 2;
public static final int ENCRYPTION_DECRYPTED = 3;
public static final int ENCRYPTION_DECRYPTION_FAILED = 4;
+ public static final int ENCRYPTION_AXOLOTL = 5;
public static final int TYPE_TEXT = 0;
public static final int TYPE_IMAGE = 1;
@@ -65,7 +67,7 @@ public class Message extends AbstractEntity {
protected int encryption;
protected int status;
protected int type;
- private boolean isTrusted = true;
+ private AxolotlService.XmppAxolotlSession axolotlSession = null;
protected String relativeFilePath;
protected boolean read = true;
protected String remoteMsgId = null;
@@ -665,15 +667,7 @@ public class Message extends AbstractEntity {
public int height = 0;
}
- public void trust() {
- this.isTrusted = true;
- }
-
- public void distrust() {
- this.isTrusted = false;
- }
-
public boolean isTrusted() {
- return this.isTrusted;
+ return this.axolotlSession != null && this.axolotlSession.isTrusted();
}
}