From 9c2ee46db0f8b9b9ecee2e3de8d614606b7eec98 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Tue, 19 Oct 2021 11:25:02 +1100 Subject: [PATCH] New emoji field --- .../proto/communities/v1/chat_identity.proto | 2 ++ .../src/proto/communities/v1/chat_identity.ts | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/packages/status-communities/proto/communities/v1/chat_identity.proto b/packages/status-communities/proto/communities/v1/chat_identity.proto index c455f278..314fb1b1 100644 --- a/packages/status-communities/proto/communities/v1/chat_identity.proto +++ b/packages/status-communities/proto/communities/v1/chat_identity.proto @@ -22,6 +22,8 @@ message ChatIdentity { string description = 5; string color = 6; + + string emoji = 7; } // ProfileImage represents data associated with a user's profile image diff --git a/packages/status-communities/src/proto/communities/v1/chat_identity.ts b/packages/status-communities/src/proto/communities/v1/chat_identity.ts index 7b311934..c75a7900 100644 --- a/packages/status-communities/src/proto/communities/v1/chat_identity.ts +++ b/packages/status-communities/src/proto/communities/v1/chat_identity.ts @@ -22,6 +22,7 @@ export interface ChatIdentity { /** description is the user set description, valid only for organisations */ description: string; color: string; + emoji: string; } export interface ChatIdentity_ImagesEntry { @@ -98,6 +99,7 @@ const baseChatIdentity: object = { displayName: "", description: "", color: "", + emoji: "", }; export const ChatIdentity = { @@ -126,6 +128,9 @@ export const ChatIdentity = { if (message.color !== "") { writer.uint32(50).string(message.color); } + if (message.emoji !== "") { + writer.uint32(58).string(message.emoji); + } return writer; }, @@ -161,6 +166,9 @@ export const ChatIdentity = { case 6: message.color = reader.string(); break; + case 7: + message.emoji = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -202,6 +210,11 @@ export const ChatIdentity = { } else { message.color = ""; } + if (object.emoji !== undefined && object.emoji !== null) { + message.emoji = String(object.emoji); + } else { + message.emoji = ""; + } return message; }, @@ -220,6 +233,7 @@ export const ChatIdentity = { message.description !== undefined && (obj.description = message.description); message.color !== undefined && (obj.color = message.color); + message.emoji !== undefined && (obj.emoji = message.emoji); return obj; }, @@ -258,6 +272,11 @@ export const ChatIdentity = { } else { message.color = ""; } + if (object.emoji !== undefined && object.emoji !== null) { + message.emoji = object.emoji; + } else { + message.emoji = ""; + } return message; }, };