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.
33 lines
989 B
TypeScript
33 lines
989 B
TypeScript
import { GroupPubkeyType } from 'libsession_util_nodejs';
|
|
import { SignalService } from '../../../../../protobuf';
|
|
import { LibSodiumWrappers } from '../../../../crypto';
|
|
import { DataMessage } from '../../DataMessage';
|
|
import { MessageParams } from '../../Message';
|
|
|
|
export type AdminSigDetails = {
|
|
secretKey: Uint8Array;
|
|
sodium: LibSodiumWrappers;
|
|
};
|
|
|
|
export interface GroupUpdateMessageParams extends MessageParams {
|
|
groupPk: GroupPubkeyType;
|
|
}
|
|
|
|
export abstract class GroupUpdateMessage extends DataMessage {
|
|
public readonly destination: GroupUpdateMessageParams['groupPk'];
|
|
|
|
constructor(params: GroupUpdateMessageParams) {
|
|
super(params);
|
|
|
|
this.destination = params.groupPk;
|
|
if (!this.destination || this.destination.length === 0) {
|
|
throw new Error('destination must be set to the groupPubkey');
|
|
}
|
|
}
|
|
|
|
public abstract dataProto(): SignalService.DataMessage;
|
|
|
|
public abstract isFor1o1Swarm(): boolean;
|
|
public abstract isForGroupSwarm(): boolean;
|
|
}
|