diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-01-30 11:49:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-30 11:49:00 -0500 |
commit | 39ee5737b7aa84833a1dc5b03c492b46e22209bd (patch) | |
tree | 61736473b9d62cd9aa9a4575198022b063711c55 /webapp/stores/post_store.jsx | |
parent | 63d68b3e36c2deaaeb7174edc1950fab3752d887 (diff) | |
download | chat-39ee5737b7aa84833a1dc5b03c492b46e22209bd.tar.gz chat-39ee5737b7aa84833a1dc5b03c492b46e22209bd.tar.bz2 chat-39ee5737b7aa84833a1dc5b03c492b46e22209bd.zip |
PLT-2555/PLT-5009/PLT-5225 Changed system messages to be rendered by the client (#5209)
* Moved rendering of (message deleted) into PostMessageView
* Added additional post types to constants on client
* Changed system messages to be rendered in the client's language
* Updated new system messages to have relevant usernames highlighted and have markdown rendered in header change messages
Diffstat (limited to 'webapp/stores/post_store.jsx')
-rw-r--r-- | webapp/stores/post_store.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/webapp/stores/post_store.jsx b/webapp/stores/post_store.jsx index 411eaf724..360b7cd72 100644 --- a/webapp/stores/post_store.jsx +++ b/webapp/stores/post_store.jsx @@ -8,7 +8,7 @@ import ChannelStore from 'stores/channel_store.jsx'; import BrowserStore from 'stores/browser_store.jsx'; import UserStore from 'stores/user_store.jsx'; -import Constants from 'utils/constants.jsx'; +import {Constants, PostTypes} from 'utils/constants.jsx'; const ActionTypes = Constants.ActionTypes; const CHANGE_EVENT = 'change'; @@ -616,7 +616,9 @@ class PostStoreClass extends EventEmitter { if (!joinLeave && postsList) { postsList.order = postsList.order.filter((id) => { - if (postsList.posts[id].type === Constants.POST_TYPE_JOIN_LEAVE) { + const post = postsList.posts[id]; + + if (post.type === PostTypes.JOIN_LEAVE || post.type === PostTypes.JOIN_CHANNEL || post.type === PostTypes.LEAVE_CHANNEL) { Reflect.deleteProperty(postsList.posts, id); return false; |