From 01dfc75b6b449614d44477aeba28e8afa5a498e6 Mon Sep 17 00:00:00 2001 From: Liam Hongman Cho Date: Fri, 7 Jun 2024 14:16:11 +0900 Subject: [PATCH] fix: Update render feedback rule based on myFeedbackStatus (#260) ### Changelog - Message feedback buttons are displayed if and only if `message.myFeedbackStatus` is not 'NOT_APPLICABLE' ### Ticket https://sendbird.atlassian.net/browse/AC-2290 discussion: https://sendbird.slack.com/archives/C0585965FFA/p1717402133967919?thread_ts=1717121915.460269&cid=C0585965FFA --- packages/self-service/src/App.tsx | 1 - packages/uikit | 2 +- src/components/CustomMessage.tsx | 1 + yarn.lock | 10 +++++----- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/self-service/src/App.tsx b/packages/self-service/src/App.tsx index d45354580..acd708f70 100644 --- a/packages/self-service/src/App.tsx +++ b/packages/self-service/src/App.tsx @@ -22,7 +22,6 @@ function App() { applicationId={appId} botId={botId} betaMark={false} - enableEmojiFeedback={false} enableMention={false} customUserAgentParam={{ 'chat-ai-widget-deployed': 'True' }} serviceName={serviceName ?? widgetServiceName.self.default} diff --git a/packages/uikit b/packages/uikit index 70808e2a2..3c5f0ea06 160000 --- a/packages/uikit +++ b/packages/uikit @@ -1 +1 @@ -Subproject commit 70808e2a24aeeb69af5f481d3e1a7ba72335982d +Subproject commit 3c5f0ea062c05d6efc70759ba4d2c0ecbdc8d1f5 diff --git a/src/components/CustomMessage.tsx b/src/components/CustomMessage.tsx index fa8b7d33d..fc0b8f3fb 100644 --- a/src/components/CustomMessage.tsx +++ b/src/components/CustomMessage.tsx @@ -69,6 +69,7 @@ export default function CustomMessage(props: Props) { const shouldRenderFeedback = () => { return ( enableEmojiFeedback && + message.myFeedbackStatus !== 'NOT_APPLICABLE' && !isBotWelcomeMessage && !(isLastBotMessage && isLastMessageInStreaming(message.data)) ); diff --git a/yarn.lock b/yarn.lock index 7bdd73b7e..d7e697795 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3068,9 +3068,9 @@ __metadata: languageName: unknown linkType: soft -"@sendbird/chat@npm:^4.12.3": - version: 4.12.6 - resolution: "@sendbird/chat@npm:4.12.6" +"@sendbird/chat@npm:^4.12.7": + version: 4.12.7 + resolution: "@sendbird/chat@npm:4.12.7" peerDependencies: "@react-native-async-storage/async-storage": ^1.17.6 react-native-mmkv: ^2.12.2 @@ -3079,7 +3079,7 @@ __metadata: optional: true react-native-mmkv: optional: true - checksum: 10c0/35b501357a9c5b3ce49a7faac5c8b8b8d7c921851ea4e0b949a86678caa7eb5a829395a20469eaa0c50c175af9d3a85d034c14f49386953558dfb048a64b340c + checksum: 10c0/c10a306e778ea3196fa6a0668a0d5d85c9e96caeacdb1f3c92a3cf036a089d1b90f07bc524d5f42f656bc548df28be50c1135505729d1d57ebe042c19e8420b4 languageName: node linkType: hard @@ -3123,7 +3123,7 @@ __metadata: "@rollup/plugin-node-resolve": "npm:^15.2.3" "@rollup/plugin-replace": "npm:^5.0.4" "@rollup/plugin-typescript": "npm:^11.1.5" - "@sendbird/chat": "npm:^4.12.3" + "@sendbird/chat": "npm:^4.12.7" "@sendbird/react-uikit-message-template-view": "npm:0.0.1-alpha.73" "@sendbird/uikit-tools": "npm:0.0.1-alpha.73" "@storybook/addon-essentials": "npm:^8.0.9"