summaryrefslogtreecommitdiffstats
path: root/web/react/components/post.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-10-02 11:08:00 -0400
committerJoramWilander <jwawilander@gmail.com>2015-10-02 11:08:00 -0400
commit11903a38341eb55bb4c6f26ea141eccb90beabe2 (patch)
tree9988d9c39af2e29e94570af8552d8ce941200a60 /web/react/components/post.jsx
parentf0c8019da468895a3da89809f63d272eaf26bb59 (diff)
downloadchat-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.jsx7
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'
/>