PLT-3918 Turn off replies for System Messages (#3922)

This commit is contained in:
enahum
2016-09-02 12:23:51 -03:00
committed by Christopher Speller
parent 385c644988
commit 7533062f6c
2 changed files with 5 additions and 4 deletions

View File

@@ -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}

View File

@@ -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,