diff options
author | Saturnino Abril <saturnino.abril@gmail.com> | 2017-01-23 18:03:57 +0900 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-01-23 09:03:57 +0000 |
commit | efbaa1eb035052cb3f52d9e8df6bd0a3ce70fcfd (patch) | |
tree | 8b86d8b9aa95081bdf8e8827ffe230ea279c0147 /webapp/actions | |
parent | 9b0ac631335bd9d2232389e26b58eee5b30ed00a (diff) | |
download | chat-efbaa1eb035052cb3f52d9e8df6bd0a3ce70fcfd.tar.gz chat-efbaa1eb035052cb3f52d9e8df6bd0a3ce70fcfd.tar.bz2 chat-efbaa1eb035052cb3f52d9e8df6bd0a3ce70fcfd.zip |
Move instances of Client.updateUserNotifyProps() in components to an action (#5156)
Diffstat (limited to 'webapp/actions')
-rw-r--r-- | webapp/actions/user_actions.jsx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx index 76879b5f5..94546cf36 100644 --- a/webapp/actions/user_actions.jsx +++ b/webapp/actions/user_actions.jsx @@ -453,6 +453,24 @@ export function generateMfaSecret(success, error) { ); } +export function updateUserNotifyProps(data, success, error) { + Client.updateUserNotifyProps( + data, + () => { + AsyncClient.getMe(); + + if (success) { + success(); + } + }, + (err) => { + if (error) { + error(err); + } + } + ); +} + export function updateUserRoles(userId, newRoles, success, error) { Client.updateUserRoles( userId, |