diff options
author | enahum <nahumhbl@gmail.com> | 2016-09-02 12:23:51 -0300 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-09-02 11:23:51 -0400 |
commit | 7533062f6c90762d899f67f5b30be2848102f813 (patch) | |
tree | 2b0ccb7063c4ff6341d3b19ffd0ffdd3e7833713 /webapp | |
parent | 385c644988517b0dc5c6d998fbd8b55f066ff91e (diff) | |
download | chat-7533062f6c90762d899f67f5b30be2848102f813.tar.gz chat-7533062f6c90762d899f67f5b30be2848102f813.tar.bz2 chat-7533062f6c90762d899f67f5b30be2848102f813.zip |
PLT-3918 Turn off replies for System Messages (#3922)
Diffstat (limited to 'webapp')
-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, |