summaryrefslogtreecommitdiffstats
path: root/web/react/stores/socket_store.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-12-09 19:16:50 -0500
committerChristopher Speller <crspeller@gmail.com>2015-12-09 19:16:50 -0500
commit468d8ed053b1126d9821b099d4acaeaf8e11f334 (patch)
treeda57414d03887a1cdff3f8c51caa0bd74db7f0c1 /web/react/stores/socket_store.jsx
parent985dc06e5fb9d809e4be4e5fff2c3b1ca66c1ea9 (diff)
parent99d79eee56a1b5a27f18fffd90545b4aef191bba (diff)
downloadchat-468d8ed053b1126d9821b099d4acaeaf8e11f334.tar.gz
chat-468d8ed053b1126d9821b099d4acaeaf8e11f334.tar.bz2
chat-468d8ed053b1126d9821b099d4acaeaf8e11f334.zip
Merge pull request #1625 from florianorben/ephemeral_messages
add helper method to add ephemeral messages; also switch 'delete mess…
Diffstat (limited to 'web/react/stores/socket_store.jsx')
-rw-r--r--web/react/stores/socket_store.jsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/web/react/stores/socket_store.jsx b/web/react/stores/socket_store.jsx
index d5aed40cf..87467b02f 100644
--- a/web/react/stores/socket_store.jsx
+++ b/web/react/stores/socket_store.jsx
@@ -160,11 +160,15 @@ function handleNewPostEvent(msg) {
AsyncClient.updateLastViewedAt();
}
} else if (UserStore.getCurrentId() !== msg.user_id || post.type !== Constants.POST_TYPE_JOIN_LEAVE) {
- AsyncClient.getChannel(msg.channel_id);
+ if (msg.props.ephemeral) {
+ AsyncClient.getChannelAndAddUnreadMessages(msg.channel_id, 1);
+ } else {
+ AsyncClient.getChannel(msg.channel_id);
+ }
}
// Send desktop notification
- if ((UserStore.getCurrentId() !== msg.user_id || post.props.from_webhook === 'true') && !Utils.isSystemMessage(post)) {
+ if ((UserStore.getCurrentId() !== msg.user_id || post.props.from_webhook === 'true') && !Utils.isSystemMessage(post) && !post.props.disable_notification) {
const msgProps = msg.props;
let mentions = [];