diff --git a/src/client/chat--messages.jsx b/src/client/chat--messages.jsx index d9e5470..7c92efc 100644 --- a/src/client/chat--messages.jsx +++ b/src/client/chat--messages.jsx @@ -4,6 +4,7 @@ import React, {useLayoutEffect, useRef} from 'react'; import {useSelector} from 'react-redux'; import {channelMessagesSelector} from '~/common/state/chat'; +import {blockedSelector} from '~/common/state/user'; import useChannel from '~/client/hooks/useChannel'; @@ -11,6 +12,7 @@ import ChatMessage from './chat--message'; import ChatSubmitMessage from './chat--submitMessage'; export default function ChatMessages() { + const blocked = useSelector(blockedSelector); const channel = useChannel(); const $messages = useRef(null); const {current} = $messages; @@ -43,6 +45,9 @@ export default function ChatMessages() { ref={$messages} > {messages && messages.map((message) => { + if (-1 !== blocked.indexOf(message.owner)) { + return null; + } const $message = (