diff --git a/packages/status-communities/src/wire/chat_identity.ts b/packages/status-communities/src/wire/chat_identity.ts index 90bc9dc7..b43c8ecb 100644 --- a/packages/status-communities/src/wire/chat_identity.ts +++ b/packages/status-communities/src/wire/chat_identity.ts @@ -1,6 +1,7 @@ import { Reader } from "protobufjs"; import * as proto from "../proto/communities/v1/chat_identity"; +import { IdentityImage } from "../proto/communities/v1/chat_identity"; export class ChatIdentity { public constructor(public proto: proto.ChatIdentity) {} @@ -14,4 +15,37 @@ export class ChatIdentity { encode(): Uint8Array { return proto.ChatIdentity.encode(this.proto).finish(); } + + /** Lamport timestamp of the message */ + get clock(): number | undefined { + return this.proto.clock; + } + + /** ens_name is the valid ENS name associated with the chat key */ + get ensName(): string | undefined { + return this.proto.ensName; + } + + /** images is a string indexed mapping of images associated with an identity */ + get images(): { [key: string]: IdentityImage } | undefined { + return this.proto.images; + } + + /** display name is the user set identity, valid only for organisations */ + get displayName(): string | undefined { + return this.proto.displayName; + } + + /** description is the user set description, valid only for organisations */ + get description(): string | undefined { + return this.proto.description; + } + + get color(): string | undefined { + return this.proto.color; + } + + get emoji(): string | undefined { + return this.proto.emoji; + } }