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.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.jsx')
-rw-r--r-- | web/react/components/post.jsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx index 9127f00de..ba53054cd 100644 --- a/web/react/components/post.jsx +++ b/web/react/components/post.jsx @@ -158,11 +158,16 @@ export default class Post extends React.Component { var profilePic = null; if (!this.props.hideProfilePic) { + let src = '/api/v1/users/' + post.user_id + '/image?time=' + timestamp; + if (post.props && post.props.override_icon_url) { + src = post.props.override_icon_url; + } + profilePic = ( <div className='post-profile-img__container'> <img className='post-profile-img' - src={'/api/v1/users/' + post.user_id + '/image?time=' + timestamp} + src={src} height='36' width='36' /> |