mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01: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."
22 lines
548 B
Java
22 lines
548 B
Java
package org.thoughtcrime.securesms.sms;
|
|
|
|
public class IncomingEndSessionMessage extends IncomingTextMessage {
|
|
|
|
public IncomingEndSessionMessage(IncomingTextMessage base) {
|
|
this(base, base.getMessageBody());
|
|
}
|
|
|
|
public IncomingEndSessionMessage(IncomingTextMessage base, String newBody) {
|
|
super(base, newBody);
|
|
}
|
|
|
|
@Override
|
|
public IncomingEndSessionMessage withMessageBody(String messageBody) {
|
|
return new IncomingEndSessionMessage(this, messageBody);
|
|
}
|
|
|
|
@Override
|
|
public boolean isEndSession() {
|
|
return true;
|
|
}
|
|
}
|