diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-10-02 11:08:00 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-10-02 11:08:00 -0400 |
commit | 11903a38341eb55bb4c6f26ea141eccb90beabe2 (patch) | |
tree | 9988d9c39af2e29e94570af8552d8ce941200a60 /web/react/components/post_header.jsx | |
parent | f0c8019da468895a3da89809f63d272eaf26bb59 (diff) | |
download | chat-11903a38341eb55bb4c6f26ea141eccb90beabe2.tar.gz chat-11903a38341eb55bb4c6f26ea141eccb90beabe2.tar.bz2 chat-11903a38341eb55bb4c6f26ea141eccb90beabe2.zip |
Add ability to override username and icon for posts from incoming webhooks.
Diffstat (limited to 'web/react/components/post_header.jsx')
-rw-r--r-- | web/react/components/post_header.jsx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/web/react/components/post_header.jsx b/web/react/components/post_header.jsx index 9dc525e03..c2cadb742 100644 --- a/web/react/components/post_header.jsx +++ b/web/react/components/post_header.jsx @@ -12,9 +12,20 @@ export default class PostHeader extends React.Component { render() { var post = this.props.post; + let userProfile = <UserProfile userId={post.user_id} />; + if (post.props && post.props.override_username) { + userProfile = ( + <UserProfile + userId={post.user_id} + overwriteName={post.props.override_username} + disablePopover={true} + /> + ); + } + return ( <ul className='post-header post-header-post'> - <li className='post-header-col post-header__name'><strong><UserProfile userId={post.user_id} /></strong></li> + <li className='post-header-col post-header__name'><strong>{userProfile}</strong></li> <li className='post-info--hidden'> <PostInfo post={post} |