session-android/src/org/thoughtcrime/securesms/sms/OutgoingEndSessionMessage.java
Moxie Marlinspike 19dddd7adf Support for an 'end session' protocol message.
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."
2014-02-19 13:50:32 -08:00

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