diff options
Diffstat (limited to 'webapp/components/post_view')
-rw-r--r-- | webapp/components/post_view/components/post_header.jsx | 5 | ||||
-rw-r--r-- | webapp/components/post_view/components/post_info.jsx | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/webapp/components/post_view/components/post_header.jsx b/webapp/components/post_view/components/post_header.jsx index 6c356126d..27715e5f5 100644 --- a/webapp/components/post_view/components/post_header.jsx +++ b/webapp/components/post_view/components/post_header.jsx @@ -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} diff --git a/webapp/components/post_view/components/post_info.jsx b/webapp/components/post_view/components/post_info.jsx index 81e6a1fc2..c67440554 100644 --- a/webapp/components/post_view/components/post_info.jsx +++ b/webapp/components/post_view/components/post_info.jsx @@ -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, |