summaryrefslogtreecommitdiffstats
path: root/web/react/components/post.jsx
diff options
context:
space:
mode:
authorFlorian Orben <florian.orben@gmail.com>2015-12-04 02:07:47 +0100
committerFlorian Orben <florian.orben@gmail.com>2015-12-04 02:07:47 +0100
commit14d1ec5191867174837e15f616ad3fc1dc8e0dae (patch)
treecc74c752199a42b3e273570586eb5abd3bc41581 /web/react/components/post.jsx
parentd5d66214db6c108eb94cf2e43c0c4538cdb5d7ae (diff)
downloadchat-14d1ec5191867174837e15f616ad3fc1dc8e0dae.tar.gz
chat-14d1ec5191867174837e15f616ad3fc1dc8e0dae.tar.bz2
chat-14d1ec5191867174837e15f616ad3fc1dc8e0dae.zip
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>