Skip to content

Commit 3d5263f

Browse files
committed
feat: reflect blocked users in block user message action
1 parent 8948aeb commit 3d5263f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/components/MessageActions/defaults.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,10 @@ const DefaultMessageActionComponents = {
316316
const { client } = useChatContext();
317317
const { message } = useMessageContext();
318318
const { t } = useTranslationContext();
319-
const isBlocked = false; // !!client.blockedUsers[targetId]
319+
const isBlocked =
320+
!message.user?.id ||
321+
new Set(client.blockedUsers.getLatestValue().userIds).has(message.user?.id);
322+
320323
return (
321324
<ContextMenuButton
322325
aria-label={isBlocked ? t('aria/Unblock User') : t('aria/Block User')}

0 commit comments

Comments
 (0)