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:
parent
3815d4efa3
commit
1b0596d574
|
@ -75,6 +75,11 @@ public class XmppAxolotlMessage {
|
||||||
public String getPlaintext() {
|
public String getPlaintext() {
|
||||||
return plaintext;
|
return plaintext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AxolotlService.XmppAxolotlSession getSession() {
|
||||||
|
return session;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public XmppAxolotlMessage(Contact contact, Element axolotlMessage) {
|
public XmppAxolotlMessage(Contact contact, Element axolotlMessage) {
|
||||||
|
|
|
@ -670,4 +670,8 @@ public class Message extends AbstractEntity {
|
||||||
public boolean isTrusted() {
|
public boolean isTrusted() {
|
||||||
return this.axolotlSession != null && this.axolotlSession.isTrusted();
|
return this.axolotlSession != null && this.axolotlSession.isTrusted();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAxolotlSession(AxolotlService.XmppAxolotlSession session) {
|
||||||
|
this.axolotlSession = session;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue