mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-3918 Turn off replies for System Messages (#3922)
This commit is contained in:
committed by
Christopher Speller
parent
385c644988
commit
7533062f6c
@@ -18,6 +18,7 @@ export default class PostHeader extends React.Component {
|
||||
|
||||
render() {
|
||||
const post = this.props.post;
|
||||
const isSystemMessage = PostUtils.isSystemMessage(post);
|
||||
|
||||
let userProfile = (
|
||||
<UserProfile
|
||||
@@ -40,7 +41,7 @@ export default class PostHeader extends React.Component {
|
||||
}
|
||||
|
||||
botIndicator = <li className='bot-indicator'>{Constants.BOT_NAME}</li>;
|
||||
} else if (PostUtils.isSystemMessage(post)) {
|
||||
} else if (isSystemMessage) {
|
||||
userProfile = (
|
||||
<UserProfile
|
||||
user={{}}
|
||||
@@ -66,7 +67,7 @@ export default class PostHeader extends React.Component {
|
||||
isCommentMention={this.props.isCommentMention}
|
||||
handleCommentClick={this.props.handleCommentClick}
|
||||
handleDropdownOpened={this.props.handleDropdownOpened}
|
||||
allowReply='true'
|
||||
allowReply={!isSystemMessage}
|
||||
isLastComment={this.props.isLastComment}
|
||||
sameUser={this.props.sameUser}
|
||||
currentUser={this.props.currentUser}
|
||||
|
||||
@@ -63,7 +63,7 @@ export default class PostInfo extends React.Component {
|
||||
dataComments = this.props.commentCount;
|
||||
}
|
||||
|
||||
if (this.props.allowReply === 'true') {
|
||||
if (this.props.allowReply) {
|
||||
dropdownContents.push(
|
||||
<li
|
||||
key='replyLink'
|
||||
@@ -388,7 +388,7 @@ PostInfo.propTypes = {
|
||||
commentCount: React.PropTypes.number.isRequired,
|
||||
isCommentMention: React.PropTypes.bool.isRequired,
|
||||
isLastComment: React.PropTypes.bool.isRequired,
|
||||
allowReply: React.PropTypes.string.isRequired,
|
||||
allowReply: React.PropTypes.bool.isRequired,
|
||||
handleCommentClick: React.PropTypes.func.isRequired,
|
||||
handleDropdownOpened: React.PropTypes.func.isRequired,
|
||||
sameUser: React.PropTypes.bool.isRequired,
|
||||
|
||||
Reference in New Issue
Block a user