summaryrefslogtreecommitdiffstats
path: root/web/react/components/post.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/post.jsx')
-rw-r--r--web/react/components/post.jsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx
index b32656bfc..786a4a325 100644
--- a/web/react/components/post.jsx
+++ b/web/react/components/post.jsx
@@ -173,6 +173,11 @@ export default class Post extends React.Component {
shouldHighlightClass = 'post--highlight';
}
+ let systemMessageClass = '';
+ if (utils.isSystemMessage(post)) {
+ systemMessageClass = 'post--system';
+ }
+
let profilePic = null;
if (!this.props.hideProfilePic) {
let src = '/api/v1/users/' + post.user_id + '/image?time=' + timestamp + '&' + utils.getSessionIndex();
@@ -180,6 +185,8 @@ export default class Post extends React.Component {
if (post.props.override_icon_url) {
src = post.props.override_icon_url;
}
+ } else if (utils.isSystemMessage(post)) {
+ src = Constants.SYSTEM_MESSAGE_PROFILE_IMAGE;
}
profilePic = (
@@ -195,7 +202,7 @@ export default class Post extends React.Component {
<div>
<div
id={'post_' + post.id}
- className={'post ' + sameUserClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss + ' ' + shouldHighlightClass}
+ className={'post ' + sameUserClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss + ' ' + shouldHighlightClass + ' ' + systemMessageClass}
>
<div className='post__content'>
<div className='post__img'>{profilePic}</div>