From 4727197e6c7645017dceec9fa8e4d5e851b23e22 Mon Sep 17 00:00:00 2001 From: Tristan Yang Date: Tue, 9 May 2023 20:07:52 +0800 Subject: [PATCH] fix: voicing tip for DM --- src/routes/chat/SessionList/Session.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/chat/SessionList/Session.tsx b/src/routes/chat/SessionList/Session.tsx index 89fc63ed..15244dce 100644 --- a/src/routes/chat/SessionList/Session.tsx +++ b/src/routes/chat/SessionList/Session.tsx @@ -101,7 +101,9 @@ const Session: FC = ({ messageData, loginUid }); - const isVoicing = type == "channel" && voiceList.findIndex(item => item.id == id) > -1; + const isVoicing = voiceList.some((item) => { + return item.context == type && item.id === id; + }); return (