summaryrefslogtreecommitdiffstats
path: root/webapp/components/post.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/post.jsx')
-rw-r--r--webapp/components/post.jsx23
1 files changed, 11 insertions, 12 deletions
diff --git a/webapp/components/post.jsx b/webapp/components/post.jsx
index 30c47ee22..7294cf163 100644
--- a/webapp/components/post.jsx
+++ b/webapp/components/post.jsx
@@ -129,6 +129,7 @@ export default class Post extends React.Component {
const post = this.props.post;
const parentPost = this.props.parentPost;
const posts = this.props.posts;
+ const mattermostLogo = Constants.MATTERMOST_ICON_SVG;
if (!post.props) {
post.props = {};
@@ -184,24 +185,22 @@ export default class Post extends React.Component {
let profilePic = null;
if (!this.props.hideProfilePic) {
- let src = '/api/v1/users/' + post.user_id + '/image?time=' + timestamp;
- if (post.props && post.props.from_webhook && global.window.mm_config.EnablePostIconOverride === 'true') {
- if (post.props.override_icon_url) {
- src = post.props.override_icon_url;
- } else {
- src = Constants.DEFAULT_WEBHOOK_LOGO;
- }
- } else if (Utils.isSystemMessage(post)) {
- src = Constants.SYSTEM_MESSAGE_PROFILE_IMAGE;
- }
-
profilePic = (
<img
- src={src}
+ src={Utils.getProfilePicSrcForPost(post, timestamp)}
height='36'
width='36'
/>
);
+
+ if (Utils.isSystemMessage(post)) {
+ profilePic = (
+ <span
+ className='icon'
+ dangerouslySetInnerHTML={{__html: mattermostLogo}}
+ />
+ );
+ }
}
return (