summaryrefslogtreecommitdiffstats
path: root/webapp/utils/utils.jsx
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-06-06 10:46:09 -0300
committerHarrison Healey <harrisonmhealey@gmail.com>2016-06-06 09:46:09 -0400
commit6cee1f87f2361f3c4b431190ae2df2b12a2157ef (patch)
tree8ca1e5798baf0aa6a046b37b59d7b50751342c60 /webapp/utils/utils.jsx
parent6ab893dcba2dc45f9dd34546b1a1b5d7604c1a7f (diff)
downloadchat-6cee1f87f2361f3c4b431190ae2df2b12a2157ef.tar.gz
chat-6cee1f87f2361f3c4b431190ae2df2b12a2157ef.tar.bz2
chat-6cee1f87f2361f3c4b431190ae2df2b12a2157ef.zip
PLT-2990 Clicking on a desktop notification from another team opens the team (#3253)
Diffstat (limited to 'webapp/utils/utils.jsx')
-rw-r--r--webapp/utils/utils.jsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index e4e3370db..fdce93ef0 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -119,7 +119,7 @@ export function getCookie(name) {
var requestedNotificationPermission = false;
-export function notifyMe(title, body, channel) {
+export function notifyMe(title, body, channel, teamId) {
if (!('Notification' in window)) {
return;
}
@@ -134,7 +134,9 @@ export function notifyMe(title, body, channel) {
notification.onclick = () => {
window.focus();
if (channel) {
- browserHistory.push(getTeamURLNoOriginFromAddressBar() + '/channels/' + channel.name);
+ browserHistory.push(TeamStore.getTeamUrl(teamId) + '/channels/' + channel.name);
+ } else if (teamId) {
+ browserHistory.push(TeamStore.getTeamUrl(teamId) + '/channels/town-square');
} else {
browserHistory.push(TeamStore.getCurrentTeamUrl() + '/channels/town-square');
}