diff options
author | Andreas Straub <andy@strb.org> | 2015-06-29 14:25:23 +0200 |
---|---|---|
committer | Andreas Straub <andy@strb.org> | 2015-07-05 17:27:29 +0200 |
commit | ab2f85d2e82f86b7c3eaeb3c8c784e9775ec6efa (patch) | |
tree | 835bd4aecc8596a803bdd2d8b45b0877c64d8316 | |
parent | a58d5e8ce3cf15e739b663ba79c75a0364969867 (diff) |
Tag messages with originating session
This can be used later in order to display trust status of messages, as
well as for potential resending of messages in case of preKey conflicts.
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlMessage.java | 5 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Message.java | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlMessage.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlMessage.java index e1b95650..01b06c22 100644 --- a/src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlMessage.java +++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlMessage.java @@ -75,6 +75,11 @@ public class XmppAxolotlMessage { public String getPlaintext() { return plaintext; } + + public AxolotlService.XmppAxolotlSession getSession() { + return session; + } + } public XmppAxolotlMessage(Contact contact, Element axolotlMessage) { diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java index f6729230..fb8b180e 100644 --- a/src/main/java/eu/siacs/conversations/entities/Message.java +++ b/src/main/java/eu/siacs/conversations/entities/Message.java @@ -660,4 +660,8 @@ public class Message extends AbstractEntity { public boolean isTrusted() { return this.axolotlSession != null && this.axolotlSession.isTrusted(); } + + public void setAxolotlSession(AxolotlService.XmppAxolotlSession session) { + this.axolotlSession = session; + } } |