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

Этот коммит содержится в:
enahum
2016-09-02 12:23:51 -03:00
коммит произвёл Christopher Speller
родитель 385c644988
Коммит 7533062f6c
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@@ -18,6 +18,7 @@ export default class PostHeader extends React.Component {
render() { render() {
const post = this.props.post; const post = this.props.post;
const isSystemMessage = PostUtils.isSystemMessage(post);
let userProfile = ( let userProfile = (
<UserProfile <UserProfile
@@ -40,7 +41,7 @@ export default class PostHeader extends React.Component {
} }
botIndicator = <li className='bot-indicator'>{Constants.BOT_NAME}</li>; botIndicator = <li className='bot-indicator'>{Constants.BOT_NAME}</li>;
} else if (PostUtils.isSystemMessage(post)) { } else if (isSystemMessage) {
userProfile = ( userProfile = (
<UserProfile <UserProfile
user={{}} user={{}}
@@ -66,7 +67,7 @@ export default class PostHeader extends React.Component {
isCommentMention={this.props.isCommentMention} isCommentMention={this.props.isCommentMention}
handleCommentClick={this.props.handleCommentClick} handleCommentClick={this.props.handleCommentClick}
handleDropdownOpened={this.props.handleDropdownOpened} handleDropdownOpened={this.props.handleDropdownOpened}
allowReply='true' allowReply={!isSystemMessage}
isLastComment={this.props.isLastComment} isLastComment={this.props.isLastComment}
sameUser={this.props.sameUser} sameUser={this.props.sameUser}
currentUser={this.props.currentUser} currentUser={this.props.currentUser}

Просмотреть файл

@@ -63,7 +63,7 @@ export default class PostInfo extends React.Component {
dataComments = this.props.commentCount; dataComments = this.props.commentCount;
} }
if (this.props.allowReply === 'true') { if (this.props.allowReply) {
dropdownContents.push( dropdownContents.push(
<li <li
key='replyLink' key='replyLink'
@@ -388,7 +388,7 @@ PostInfo.propTypes = {
commentCount: React.PropTypes.number.isRequired, commentCount: React.PropTypes.number.isRequired,
isCommentMention: React.PropTypes.bool.isRequired, isCommentMention: React.PropTypes.bool.isRequired,
isLastComment: React.PropTypes.bool.isRequired, isLastComment: React.PropTypes.bool.isRequired,
allowReply: React.PropTypes.string.isRequired, allowReply: React.PropTypes.bool.isRequired,
handleCommentClick: React.PropTypes.func.isRequired, handleCommentClick: React.PropTypes.func.isRequired,
handleDropdownOpened: React.PropTypes.func.isRequired, handleDropdownOpened: React.PropTypes.func.isRequired,
sameUser: React.PropTypes.bool.isRequired, sameUser: React.PropTypes.bool.isRequired,