diff options
author | George Goldberg <george@gberg.me> | 2017-03-17 16:29:26 +0000 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-03-17 16:29:26 +0000 |
commit | 7f266c19511171f509ae8a60170de10c8d10b41e (patch) | |
tree | 04cd68ac4722313abec3ea47cc7cda229e463b1d /webapp/stores | |
parent | bfae88e60c7a623afae82e06ce1421ca778c06e7 (diff) | |
parent | 8568afe5b4fb4d26b14fbc0d21f088eaa490b314 (diff) | |
download | chat-7f266c19511171f509ae8a60170de10c8d10b41e.tar.gz chat-7f266c19511171f509ae8a60170de10c8d10b41e.tar.bz2 chat-7f266c19511171f509ae8a60170de10c8d10b41e.zip |
Merge branch 'release-3.7' into master.
Diffstat (limited to 'webapp/stores')
-rw-r--r-- | webapp/stores/channel_store.jsx | 4 | ||||
-rw-r--r-- | webapp/stores/notification_store.jsx | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx index f303b0190..41fa76b39 100644 --- a/webapp/stores/channel_store.jsx +++ b/webapp/stores/channel_store.jsx @@ -10,7 +10,7 @@ import UserStore from 'stores/user_store.jsx'; var ChannelUtils; var Utils; import {ActionTypes, Constants} from 'utils/constants.jsx'; -import {isSystemMessage} from 'utils/post_utils.jsx'; +import {isSystemMessage, isFromWebhook} from 'utils/post_utils.jsx'; const NotificationPrefs = Constants.NotificationPrefs; const CHANGE_EVENT = 'change'; @@ -521,7 +521,7 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => { return; } - if (action.post.user_id === UserStore.getCurrentId() && !isSystemMessage(action.post)) { + if (action.post.user_id === UserStore.getCurrentId() && !isSystemMessage(action.post) && !isFromWebhook(action.post)) { return; } diff --git a/webapp/stores/notification_store.jsx b/webapp/stores/notification_store.jsx index f32e71047..f32107ef7 100644 --- a/webapp/stores/notification_store.jsx +++ b/webapp/stores/notification_store.jsx @@ -82,6 +82,10 @@ class NotificationStoreClass extends EventEmitter { title = channel.display_name; } + if (title === '') { + title = msgProps.channel_display_name; + } + let notifyText = post.message.replace(/\n+/g, ' '); if (notifyText.length > 50) { notifyText = notifyText.substring(0, 49) + '...'; |