From 6611229cd7bd3cdfc0082c0a581145aaac0ab322 Mon Sep 17 00:00:00 2001
From: Corey Hulen <corey@hulen.com>
Date: Wed, 4 May 2016 06:31:42 -0700
Subject: PLT-2707 Adding option to show DM list from all of server (#2871)

* PLT-2707 Adding option to show DM list from all of server

* Fixing loc
---
 webapp/utils/async_client.jsx | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

(limited to 'webapp/utils/async_client.jsx')

diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx
index 189b159e8..0dede3bc9 100644
--- a/webapp/utils/async_client.jsx
+++ b/webapp/utils/async_client.jsx
@@ -224,6 +224,28 @@ export function getTeamMembers(teamId) {
     );
 }
 
+export function getProfilesForDirectMessageList() {
+    if (isCallInProgress('getProfilesForDirectMessageList')) {
+        return;
+    }
+
+    callTracker.getProfilesForDirectMessageList = utils.getTimestamp();
+    Client.getProfilesForDirectMessageList(
+        (data) => {
+            callTracker.getProfilesForDirectMessageList = 0;
+
+            AppDispatcher.handleServerAction({
+                type: ActionTypes.RECEIVED_PROFILES_FOR_DM_LIST,
+                profiles: data
+            });
+        },
+        (err) => {
+            callTracker.getProfilesForDirectMessageList = 0;
+            dispatchError(err, 'getProfilesForDirectMessageList');
+        }
+    );
+}
+
 export function getProfiles() {
     if (isCallInProgress('getProfiles')) {
         return;
-- 
cgit v1.2.3-1-g7c22

