summaryrefslogtreecommitdiffstats
path: root/webapp/utils/utils.jsx
diff options
context:
space:
mode:
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');
}