Adding isApproved field to protobuf.

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

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

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

Loading…
Cancel
Save