mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 19:15:16 +00:00
19dddd7adf
1) On the push side, this message is a flag in PushMessageContent. Any secure message with that flag will terminate the current sessin. 2) On the SMS side, there is an "end session" wire type and the convention that a message with this wire type must be secure and contain the string "TERMINATE."
23 lines
521 B
Java
23 lines
521 B
Java
package org.thoughtcrime.securesms.sms;
|
|
|
|
public class OutgoingEndSessionMessage extends OutgoingTextMessage {
|
|
|
|
public OutgoingEndSessionMessage(OutgoingTextMessage base) {
|
|
this(base, base.getMessageBody());
|
|
}
|
|
|
|
public OutgoingEndSessionMessage(OutgoingTextMessage message, String body) {
|
|
super(message, body);
|
|
}
|
|
|
|
@Override
|
|
public boolean isEndSession() {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public OutgoingTextMessage withBody(String body) {
|
|
return new OutgoingEndSessionMessage(this, body);
|
|
}
|
|
}
|