summaryrefslogtreecommitdiffstats
path: root/web/react/components/post.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-12-04 11:30:50 -0800
committerCorey Hulen <corey@hulen.com>2015-12-04 11:30:50 -0800
commit1bee1e06e4d0110db274c076860fa97f76471ddb (patch)
tree8f971b54319ae90246ad13905851df545bbb7b89 /web/react/components/post.jsx
parent1d67f26664f8cf98f52433ef8b081b6fb485eadb (diff)
parent14d1ec5191867174837e15f616ad3fc1dc8e0dae (diff)
downloadchat-1bee1e06e4d0110db274c076860fa97f76471ddb.tar.gz
chat-1bee1e06e4d0110db274c076860fa97f76471ddb.tar.bz2
chat-1bee1e06e4d0110db274c076860fa97f76471ddb.zip
Merge pull request #1613 from florianorben/PLT-1326
PLT-1326: Enable channel posts of type join or leave not trigger unread notifications
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>