Fix desktop notification click handler for existing/new GMs (#5633)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
163f591b7b
Коммит
615d116c45
@@ -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');
|
||||
|
||||
@@ -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);
|
||||
|
||||
Ссылка в новой задаче
Block a user