diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json index 8c8b614988..47c1732bdb 100644 --- a/webapp/i18n/en.json +++ b/webapp/i18n/en.json @@ -1097,6 +1097,7 @@ "navbar_dropdown.switchTo": "Switch to ", "navbar_dropdown.teamLink": "Get Team Invite Link", "navbar_dropdown.teamSettings": "Team Settings", + "notification.dm": "Direct Message", "password_form.change": "Change my password", "password_form.click": "Click here to log in.", "password_form.enter": "Enter a new password for your {siteName} account.", diff --git a/webapp/stores/notification_store.jsx b/webapp/stores/notification_store.jsx index 78f8e56c87..e05d203291 100644 --- a/webapp/stores/notification_store.jsx +++ b/webapp/stores/notification_store.jsx @@ -63,10 +63,12 @@ class NotificationStoreClass extends EventEmitter { } let title = Utils.localizeMessage('channel_loader.posted', 'Posted'); - if (channel) { - title = channel.display_name; - } else if (msgProps.channel_display_name) { + if (!channel) { title = msgProps.channel_display_name; + } else if (channel.type === Constants.DM_CHANNEL) { + title = Utils.localizeMessage('notification.dm', 'Direct Message'); + } else { + title = channel.display_name; } let notifyText = post.message.replace(/\n+/g, ' ');