From 2adb1571fcbb01b59f650bcb2320f7926bc13715 Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Mon, 15 Jan 2024 11:49:09 +0530 Subject: [PATCH 1/2] fixed blank chat name --- src/common/utils.ts | 2 +- .../ChatConversations/ConversationList/ConversationList.tsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/utils.ts b/src/common/utils.ts index f060406ff..e9b6ce5c4 100644 --- a/src/common/utils.ts +++ b/src/common/utils.ts @@ -156,7 +156,7 @@ export const getDisplayName = (conversation: any) => { setLogs(er, 'error'); } - if (contactFields?.name) { + if (contactFields?.name && contactFields.name.value) { displayName = contactFields.name.value; } else if (conversation.contact.name) { displayName = conversation.contact.name; diff --git a/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx b/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx index 72f2aed31..ff08e4d03 100644 --- a/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx +++ b/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx @@ -256,7 +256,6 @@ export const ConversationList = ({ if (conversation.contact) { contact = conversation.contact; } - let selectedRecord = false; if (selectedContactId === contact.id) { selectedRecord = true; From f8b12be3377d6b0c8f3a795f5964575bd0f0b224 Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Mon, 15 Jan 2024 11:53:35 +0530 Subject: [PATCH 2/2] fixed blank chat name --- .../Chat/ChatConversations/ConversationList/ConversationList.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx b/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx index ff08e4d03..72f2aed31 100644 --- a/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx +++ b/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx @@ -256,6 +256,7 @@ export const ConversationList = ({ if (conversation.contact) { contact = conversation.contact; } + let selectedRecord = false; if (selectedContactId === contact.id) { selectedRecord = true;