You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-desktop/ts/session/messages/outgoing/content/EndSessionMessage.ts

22 lines
621 B
TypeScript

import { SessionRequestMessage } from './SessionRequestMessage';
import { SignalService } from '../../../../protobuf';
export class EndSessionMessage extends SessionRequestMessage {
public ttl(): number {
return 4 * 24 * 60 * 60 * 1000; // 4 days
}
protected contentProto(): SignalService.Content {
const dataMessage = new SignalService.DataMessage({
body: 'TERMINATE',
flags: SignalService.DataMessage.Flags.END_SESSION,
});
const preKeyBundleMessage = this.getPreKeyBundleMessage();
return new SignalService.Content({
dataMessage,
preKeyBundleMessage,
});
}
}