Tag messages with originating session
Andreas Straub
created
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.
Change summary
src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlMessage.java | 5
src/main/java/eu/siacs/conversations/entities/Message.java | 4
2 files changed, 9 insertions(+)
Detailed changes
@@ -75,6 +75,11 @@ public class XmppAxolotlMessage {
public String getPlaintext() {
return plaintext;
}
+
+ public AxolotlService.XmppAxolotlSession getSession() {
+ return session;
+ }
+
}
public XmppAxolotlMessage(Contact contact, Element axolotlMessage) {
@@ -670,4 +670,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;
+ }
}