diff options
author | David Lu <david.lu@hotmail.com> | 2016-06-29 08:46:10 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-06-29 08:46:10 -0400 |
commit | 4c9b48da8f54bc9af83c7e987149be316f5c61f7 (patch) | |
tree | 782c42169faefc5b6752db5082e977cbb843a8cd | |
parent | fccacbbf964dd95a025b02555b29f39667a03f0a (diff) | |
download | chat-4c9b48da8f54bc9af83c7e987149be316f5c61f7.tar.gz chat-4c9b48da8f54bc9af83c7e987149be316f5c61f7.tar.bz2 chat-4c9b48da8f54bc9af83c7e987149be316f5c61f7.zip |
PLT-3328 Added Title for Direct Message Desktop Notifications (#3438)
* Added title for DM desktop notifications
-rw-r--r-- | webapp/i18n/en.json | 1 | ||||
-rw-r--r-- | webapp/stores/notification_store.jsx | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json index 8c8b61498..47c1732bd 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 <a href={url}>here</a> 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 78f8e56c8..e05d20329 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, ' '); |