From 1fa3f2351c98e4d1b9c198e357d90ac0d436dcaa Mon Sep 17 00:00:00 2001
From: George Goldberg <george@gberg.me>
Date: Tue, 4 Apr 2017 20:17:15 +0100
Subject: PLT-6023: Add Users to Team in WebApp. (#5956)

* PLT-6198: Use added to channel system message on default channels.

Use a different sytem message when a user was added to a default channel
by someone else than when they joined themselves.

* PLT-6023: Add Users to Team in WebApp.

* Fix string text.

* Handle added_to_team websocket message.

* Fix unread flag on new channel.
---
 webapp/actions/user_actions.jsx | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

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

diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx
index b9d4ec376..1ab85922d 100644
--- a/webapp/actions/user_actions.jsx
+++ b/webapp/actions/user_actions.jsx
@@ -492,6 +492,28 @@ export function searchUsers(term, teamId = TeamStore.getCurrentId(), options = {
     );
 }
 
+export function searchUsersNotInTeam(term, teamId = TeamStore.getCurrentId(), options = {}, success, error) {
+    Client.searchUsersNotInTeam(
+        term,
+        teamId,
+        options,
+        (data) => {
+            loadStatusesForProfilesList(data);
+
+            if (success) {
+                success(data);
+            }
+        },
+        (err) => {
+            AsyncClient.dispatchError(err, 'searchUsersNotInTeam');
+
+            if (error) {
+                error(err);
+            }
+        }
+    );
+}
+
 export function autocompleteUsersInChannel(username, channelId, success, error) {
     Client.autocompleteUsersInChannel(
         username,
-- 
cgit v1.2.3-1-g7c22

