diff options
author | Gabe Kangas <gabek@real-ity.com> | 2021-12-15 17:28:56 -0800 |
---|---|---|
committer | Gabe Kangas <gabek@real-ity.com> | 2021-12-15 17:28:56 -0800 |
commit | 734a5a45ef199176f6d3a40856b3d7d336e485cc (patch) | |
tree | c835cb89db0a7080750680661433ff5b8ebf8633 | |
parent | a747a26c75b82203316ef2b5f19bd3b1ab79b84f (diff) |
Non-user chat messages should always render as visible
-rw-r--r-- | webroot/js/components/chat/chat.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/webroot/js/components/chat/chat.js b/webroot/js/components/chat/chat.js index 5c7df8ce3..501998f48 100644 --- a/webroot/js/components/chat/chat.js +++ b/webroot/js/components/chat/chat.js @@ -23,7 +23,6 @@ const renderableChatStyleMessages = [ SOCKET_MESSAGE_TYPES.SYSTEM, SOCKET_MESSAGE_TYPES.CHAT, ]; - export default class Chat extends Component { constructor(props, context) { super(props, context); @@ -199,7 +198,6 @@ export default class Chat extends Component { id: messageId, type: messageType, timestamp: messageTimestamp, - visible: messageVisible, } = message; const { messages: curMessages } = this.state; const { username, readonly } = this.props; @@ -208,6 +206,10 @@ export default class Chat extends Component { (item) => item.id === messageId ); + // Allow non-user chat messages to be visible by default. + const messageVisible = + message.visible || messageType !== SOCKET_MESSAGE_TYPES.CHAT; + // check moderator status if (messageType === SOCKET_MESSAGE_TYPES.CONNECTED_USER_INFO) { const modStatusUpdate = checkIsModerator(message); |