From 02d581c1599c5d50cc507bd2633f1e3c34b1cc84 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Tue, 29 Nov 2016 10:12:59 -0500
Subject: PLT-4697 Update channel switcher to autocomplete all users on the
 system (#4624)

* Add autocomplete API for system-wide users

* Update channel switcher to autocomplete all users on the system
---
 webapp/actions/user_actions.jsx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

(limited to 'webapp/actions/user_actions.jsx')

diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx
index ce2246d30..455ca1730 100644
--- a/webapp/actions/user_actions.jsx
+++ b/webapp/actions/user_actions.jsx
@@ -318,6 +318,24 @@ export function autocompleteUsersInTeam(username, success, error) {
     );
 }
 
+export function autocompleteUsers(username, success, error) {
+    Client.autocompleteUsers(
+        username,
+        (data) => {
+            if (success) {
+                success(data);
+            }
+        },
+        (err) => {
+            AsyncClient.dispatchError(err, 'autocompleteUsers');
+
+            if (error) {
+                error(err);
+            }
+        }
+    );
+}
+
 export function updateUser(username, success, error) {
     Client.updateUser(
         username,
-- 
cgit v1.2.3-1-g7c22

