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.
This commit is contained in:
Andreas Straub 2015-06-29 14:25:23 +02:00
parent 3815d4efa3
commit 1b0596d574
2 changed files with 9 additions and 0 deletions

View File

@ -75,6 +75,11 @@ public class XmppAxolotlMessage {
public String getPlaintext() {
return plaintext;
}
public AxolotlService.XmppAxolotlSession getSession() {
return session;
}
}
public XmppAxolotlMessage(Contact contact, Element axolotlMessage) {

View File

@ -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;
}
}