Non-user chat messages should always render as visible
This commit is contained in:
parent
a747a26c75
commit
734a5a45ef
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user