diff options
author | JoramWilander <jwawilander@gmail.com> | 2016-02-23 11:09:59 -0500 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2016-02-23 11:09:59 -0500 |
commit | 1f049af2b7ea41a5e1e79a8263e10fa58f186c8d (patch) | |
tree | 4a49aef95e886f10052b83319588f02ec75d830e /web/react/components/post_header.jsx | |
parent | c16071afc5320677bc2c13fa4dff941152e18970 (diff) | |
download | chat-1f049af2b7ea41a5e1e79a8263e10fa58f186c8d.tar.gz chat-1f049af2b7ea41a5e1e79a8263e10fa58f186c8d.tar.bz2 chat-1f049af2b7ea41a5e1e79a8263e10fa58f186c8d.zip |
Refactor listener out of user profile and fix thread logic
Diffstat (limited to 'web/react/components/post_header.jsx')
-rw-r--r-- | web/react/components/post_header.jsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/web/react/components/post_header.jsx b/web/react/components/post_header.jsx index c52391daa..2803fe387 100644 --- a/web/react/components/post_header.jsx +++ b/web/react/components/post_header.jsx @@ -13,16 +13,17 @@ export default class PostHeader extends React.Component { this.state = {}; } render() { - var post = this.props.post; + const post = this.props.post; + const user = this.props.user; - let userProfile = <UserProfile userId={post.user_id}/>; + let userProfile = <UserProfile user={user}/>; let botIndicator; if (post.props && post.props.from_webhook) { if (post.props.override_username && global.window.mm_config.EnablePostUsernameOverride === 'true') { userProfile = ( <UserProfile - userId={post.user_id} + user={user} overwriteName={post.props.override_username} disablePopover={true} /> @@ -33,7 +34,7 @@ export default class PostHeader extends React.Component { } else if (Utils.isSystemMessage(post)) { userProfile = ( <UserProfile - userId={''} + user={{}} overwriteName={Constants.SYSTEM_MESSAGE_PROFILE_NAME} overwriteImage={Constants.SYSTEM_MESSAGE_PROFILE_IMAGE} disablePopover={true} @@ -68,6 +69,7 @@ PostHeader.defaultProps = { }; PostHeader.propTypes = { post: React.PropTypes.object, + user: React.PropTypes.object, commentCount: React.PropTypes.number, isLastComment: React.PropTypes.bool, handleCommentClick: React.PropTypes.func, |