From fcb92fa1b53a2b67323a881e7cb03965d3ec24d1 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Tue, 2 Feb 2016 10:52:18 -0500 Subject: Added ephemeral messages sent when a user mentions someone not in the channel --- web/react/stores/socket_store.jsx | 1 + 1 file changed, 1 insertion(+) (limited to 'web/react/stores/socket_store.jsx') diff --git a/web/react/stores/socket_store.jsx b/web/react/stores/socket_store.jsx index 744c2c8e5..745b94313 100644 --- a/web/react/stores/socket_store.jsx +++ b/web/react/stores/socket_store.jsx @@ -109,6 +109,7 @@ class SocketStoreClass extends EventEmitter { handleMessage(msg) { switch (msg.action) { case SocketEvents.POSTED: + case SocketEvents.EPHEMERAL_MESSAGE: handleNewPostEvent(msg, this.translations); break; -- cgit v1.2.3-1-g7c22 From f935be121c0b6764e1e30f1b5d4eb6e78137fa36 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Wed, 3 Feb 2016 15:21:03 -0500 Subject: Added helper methods to send ephemeral messages to specific users --- web/react/stores/socket_store.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'web/react/stores/socket_store.jsx') diff --git a/web/react/stores/socket_store.jsx b/web/react/stores/socket_store.jsx index 745b94313..33604f44b 100644 --- a/web/react/stores/socket_store.jsx +++ b/web/react/stores/socket_store.jsx @@ -180,7 +180,6 @@ function handleNewPostEvent(msg, translations) { mentions = JSON.parse(msg.props.mentions); } - const channelType = msgProps.channel_type; const channel = ChannelStore.get(msg.channel_id); const user = UserStore.getCurrentUser(); const member = ChannelStore.getMember(msg.channel_id); @@ -192,7 +191,7 @@ function handleNewPostEvent(msg, translations) { if (notifyLevel === 'none') { return; - } else if (notifyLevel === 'mention' && mentions.indexOf(user.id) === -1 && channelType !== Constants.DM_CHANNEL) { + } else if (notifyLevel === 'mention' && mentions.indexOf(user.id) === -1 && channel.type !== Constants.DM_CHANNEL) { return; } -- cgit v1.2.3-1-g7c22