summaryrefslogtreecommitdiffstats
path: root/webapp/client
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/client
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/client')
-rw-r--r--webapp/client/client.jsx11
1 files changed, 10 insertions, 1 deletions
diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx
index 38cc2f111..ff42fb7ac 100644
--- a/webapp/client/client.jsx
+++ b/webapp/client/client.jsx
@@ -1112,7 +1112,7 @@ export default class Client {
set(this.defaultHeaders).
type('application/json').
accept('application/json').
- end(this.handleResponse.bind(this, 'autocompleteUsers', success, error));
+ end(this.handleResponse.bind(this, 'autocompleteUsersInChannel', success, error));
}
autocompleteUsersInTeam(term, success, error) {
@@ -1121,6 +1121,15 @@ export default class Client {
set(this.defaultHeaders).
type('application/json').
accept('application/json').
+ end(this.handleResponse.bind(this, 'autocompleteUsersInTeam', success, error));
+ }
+
+ autocompleteUsers(term, success, error) {
+ request.
+ get(`${this.getUsersRoute()}/autocomplete?term=${encodeURIComponent(term)}`).
+ set(this.defaultHeaders).
+ type('application/json').
+ accept('application/json').
end(this.handleResponse.bind(this, 'autocompleteUsers', success, error));
}