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.
26 lines
768 B
TypeScript
26 lines
768 B
TypeScript
5 years ago
|
import { SyncMessage } from './SyncMessage';
|
||
|
import { SignalService } from '../../../../../protobuf';
|
||
|
import { MessageParams } from '../../Message';
|
||
|
import { PubKey } from '../../../../types';
|
||
|
|
||
|
interface ClosedGroupSyncMessageParams extends MessageParams {
|
||
|
data: Uint8Array;
|
||
|
}
|
||
|
|
||
|
export abstract class ClosedGroupSyncMessage extends SyncMessage {
|
||
|
public readonly data: Uint8Array;
|
||
|
|
||
|
constructor(params: ClosedGroupSyncMessageParams) {
|
||
|
super({ timestamp: params.timestamp, identifier: params.identifier });
|
||
|
this.data = params.data;
|
||
|
}
|
||
|
|
||
|
protected syncProto(): SignalService.SyncMessage {
|
||
|
const syncMessage = super.syncProto();
|
||
|
syncMessage.groups = new SignalService.SyncMessage.Groups({
|
||
|
data: this.data,
|
||
|
});
|
||
|
return syncMessage;
|
||
|
}
|
||
|
}
|