Adding isApproved field to protobuf.

pull/2000/head
Warrick Corfe-Tan 3 years ago
parent d57300688e
commit 9e0f128fc6

@ -170,6 +170,7 @@ message ConfigurationMessage {
required string name = 2;
optional string profilePicture = 3;
optional bytes profileKey = 4;
optional bool isApproved = 5;
}
repeated ClosedGroup closedGroups = 1;

@ -93,22 +93,26 @@ export class ConfigurationMessageContact {
public displayName: string;
public profilePictureURL?: string;
public profileKey?: Uint8Array;
public isApproved?: boolean;
public constructor({
publicKey,
displayName,
profilePictureURL,
profileKey,
isApproved,
}: {
publicKey: string;
displayName: string;
profilePictureURL?: string;
profileKey?: Uint8Array;
isApproved?: boolean;
}) {
this.publicKey = publicKey;
this.displayName = displayName;
this.profilePictureURL = profilePictureURL;
this.profileKey = profileKey;
this.isApproved = isApproved;
// will throw if public key is invalid
PubKey.cast(publicKey);
@ -131,6 +135,7 @@ export class ConfigurationMessageContact {
name: this.displayName,
profilePicture: this.profilePictureURL,
profileKey: this.profileKey,
isApproved: this.isApproved,
});
}
}

Loading…
Cancel
Save