summaryrefslogtreecommitdiffstats
path: root/webapp/actions
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-11-29 10:12:59 -0500
committerChristopher Speller <crspeller@gmail.com>2016-11-29 10:12:59 -0500
commit02d581c1599c5d50cc507bd2633f1e3c34b1cc84 (patch)
tree73437f73a8031b8c792e4b6652d1eb2428c6f2d7 /webapp/actions
parentad52183248512b9aafa59b4429364c75e024cf6f (diff)
downloadchat-02d581c1599c5d50cc507bd2633f1e3c34b1cc84.tar.gz
chat-02d581c1599c5d50cc507bd2633f1e3c34b1cc84.tar.bz2
chat-02d581c1599c5d50cc507bd2633f1e3c34b1cc84.zip
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
Diffstat (limited to 'webapp/actions')
-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 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,