summaryrefslogtreecommitdiffstats
path: root/webapp/actions/user_actions.jsx
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-01-23 18:03:57 +0900
committerGeorge Goldberg <george@gberg.me>2017-01-23 09:03:57 +0000
commitefbaa1eb035052cb3f52d9e8df6bd0a3ce70fcfd (patch)
tree8b86d8b9aa95081bdf8e8827ffe230ea279c0147 /webapp/actions/user_actions.jsx
parent9b0ac631335bd9d2232389e26b58eee5b30ed00a (diff)
downloadchat-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/user_actions.jsx')
-rw-r--r--webapp/actions/user_actions.jsx18
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,