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.
30 lines
764 B
TypeScript
30 lines
764 B
TypeScript
5 years ago
|
import { SignalService } from '../../../../../../protobuf';
|
||
|
import { ClosedGroupMessage, ClosedGroupMessageParams } from './ClosedGroupMessage';
|
||
|
|
||
|
|
||
|
export class ClosedGroupLeaveMessage extends ClosedGroupMessage {
|
||
|
|
||
|
constructor(params: ClosedGroupMessageParams) {
|
||
|
super({
|
||
|
timestamp: params.timestamp,
|
||
|
identifier: params.identifier,
|
||
|
groupId: params.groupId,
|
||
|
});
|
||
|
}
|
||
|
|
||
|
public ttl(): number {
|
||
|
return this.getDefaultTTL();
|
||
|
}
|
||
|
|
||
|
protected groupContextType(): SignalService.GroupContext.Type {
|
||
|
return SignalService.GroupContext.Type.QUIT;
|
||
|
}
|
||
|
|
||
|
protected dataProto(): SignalService.DataMessage {
|
||
|
const messageProto = new SignalService.DataMessage();
|
||
|
messageProto.group = this.groupContext();
|
||
|
|
||
|
return messageProto;
|
||
|
}
|
||
|
}
|