diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-03-04 12:58:37 -0500 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-03-04 17:58:37 +0000 |
commit | 615d116c45923ad4efc4170d150002c599a48fd9 (patch) | |
tree | 71981a43ac4523157ef964ed319f6725f39a7a66 /webapp | |
parent | 163f591b7bad960ff61ad4eb69589ee2aec5d8e1 (diff) | |
download | chat-615d116c45923ad4efc4170d150002c599a48fd9.tar.gz chat-615d116c45923ad4efc4170d150002c599a48fd9.tar.bz2 chat-615d116c45923ad4efc4170d150002c599a48fd9.zip |
Fix desktop notification click handler for existing/new GMs (#5633)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/stores/notification_store.jsx | 3 | ||||
-rw-r--r-- | webapp/utils/utils.jsx | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/webapp/stores/notification_store.jsx b/webapp/stores/notification_store.jsx index 28e5ea65d..f32e71047 100644 --- a/webapp/stores/notification_store.jsx +++ b/webapp/stores/notification_store.jsx @@ -71,7 +71,8 @@ class NotificationStoreClass extends EventEmitter { if (!channel) { title = msgProps.channel_display_name; channel = { - name: msgProps.channel_name + name: msgProps.channel_name, + type: msgProps.channel_type }; } else if (channel.type === Constants.DM_CHANNEL) { title = Utils.localizeMessage('notification.dm', 'Direct Message'); diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx index 7573eb887..384cea752 100644 --- a/webapp/utils/utils.jsx +++ b/webapp/utils/utils.jsx @@ -104,7 +104,7 @@ export function notifyMe(title, body, channel, teamId, duration, silent) { var notification = new Notification(title, {body, tag: body, icon: icon50, requireInteraction: notificationDuration === 0, silent}); notification.onclick = () => { window.focus(); - if (channel && channel.type === Constants.DM_CHANNEL) { + if (channel && (channel.type === Constants.DM_CHANNEL || channel.type === Constants.GM_CHANNEL)) { browserHistory.push(TeamStore.getCurrentTeamUrl() + '/channels/' + channel.name); } else if (channel) { browserHistory.push(TeamStore.getTeamUrl(teamId) + '/channels/' + channel.name); |