Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Non-user chat messages should always render as visible

Gabe Kangas7a85eea4a67f
diff --git a/webroot/js/components/chat/chat.js b/webroot/js/components/chat/chat.js
index 5c7df8ce33..501998f481 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);