diff options
author | enahum <nahumhbl@gmail.com> | 2017-02-27 17:55:12 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 17:55:12 -0300 |
commit | f07571d79de1c00529136cd74c075ddfc4784b41 (patch) | |
tree | fe67b9879fe6e09d65bf36260b77185e7f2c6704 /webapp/actions/channel_actions.jsx | |
parent | 48f97a5a2a0754bfc0e639db7cce03943e990e32 (diff) | |
download | chat-f07571d79de1c00529136cd74c075ddfc4784b41.tar.gz chat-f07571d79de1c00529136cd74c075ddfc4784b41.tar.bz2 chat-f07571d79de1c00529136cd74c075ddfc4784b41.zip |
PLT-3193 Add channel notification preferences for push notifications (#5512)
* PLT-3193 Add channel notification preferences for push and email notifications
* Fixing UI
* Removing email as preferences from the UI for now
* move to action
* fix client test
Diffstat (limited to 'webapp/actions/channel_actions.jsx')
-rw-r--r-- | webapp/actions/channel_actions.jsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/webapp/actions/channel_actions.jsx b/webapp/actions/channel_actions.jsx index 5f41d127d..582de54cc 100644 --- a/webapp/actions/channel_actions.jsx +++ b/webapp/actions/channel_actions.jsx @@ -316,9 +316,13 @@ export function autocompleteChannels(term, success, error) { ); } -export function updateChannelNotifyProps(data, success, error) { - Client.updateChannelNotifyProps(data, +export function updateChannelNotifyProps(data, options, success, error) { + Client.updateChannelNotifyProps(Object.assign({}, data, options), () => { + const member = ChannelStore.getMyMember(data.channel_id); + member.notify_props = Object.assign(member.notify_props, options); + ChannelStore.storeMyChannelMember(member); + if (success) { success(); } |