summaryrefslogtreecommitdiffstats
path: root/webapp/actions
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2017-02-27 17:55:12 -0300
committerGitHub <noreply@github.com>2017-02-27 17:55:12 -0300
commitf07571d79de1c00529136cd74c075ddfc4784b41 (patch)
treefe67b9879fe6e09d65bf36260b77185e7f2c6704 /webapp/actions
parent48f97a5a2a0754bfc0e639db7cce03943e990e32 (diff)
downloadchat-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')
-rw-r--r--webapp/actions/channel_actions.jsx8
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();
}