PLT-2990 Clicking on a desktop notification from another team opens the team (#3253)

Этот коммит содержится в:
enahum
2016-06-06 10:46:09 -03:00
коммит произвёл Harrison Healey
родитель 6ab893dcba
Коммит 6cee1f87f2
4 изменённых файлов: 19 добавлений и 6 удалений

Просмотреть файл

@@ -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');
}