From 999d1553e1ce45adf58f6082b160bc1147dc592b Mon Sep 17 00:00:00 2001
From: enahum <nahumhbl@gmail.com>
Date: Mon, 19 Dec 2016 10:05:46 -0300
Subject: PLT-4167 Team Sidebar (#4569)

* PLT-4167 Team Sidebar

* Address feedback from PM

* change route from my_members to members

* bug fixes

* Updating styles for teams sidebar (#4681)

* Added PM changes

* Fix corner cases

* Addressing feedback

* use two different endpoints

* Bug fixes

* Rename model and client functions, using preferences to store last team and channel viewed

* Fix mobile notification count and closing the team sidebar

* unit test, fixed bad merge and retrieve from cached when available

* bug fixes

* use id for last channel in preferences, query optimization

* Updating multi team css (#4830)
---
 webapp/client/client.jsx | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

(limited to 'webapp/client/client.jsx')

diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx
index 370d40ac0..3ec36644f 100644
--- a/webapp/client/client.jsx
+++ b/webapp/client/client.jsx
@@ -598,6 +598,30 @@ export default class Client {
             end(this.handleResponse.bind(this, 'getTeamMember', success, error));
     }
 
+    getMyTeamMembers(success, error) {
+        request.
+        get(`${this.getTeamsRoute()}/members`).
+        set(this.defaultHeaders).
+        type('application/json').
+        accept('application/json').
+        end(this.handleResponse.bind(this, 'getMyTeamMembers', success, error));
+    }
+
+    getMyTeamsUnread(teamId, success, error) {
+        let url = `${this.getTeamsRoute()}/unread`;
+
+        if (teamId) {
+            url += `?id=${encodeURIComponent(teamId)}`;
+        }
+
+        request.
+        get(url).
+        set(this.defaultHeaders).
+        type('application/json').
+        accept('application/json').
+        end(this.handleResponse.bind(this, 'getMyTeamsUnread', success, error));
+    }
+
     getTeamMembersByIds(teamId, userIds, success, error) {
         request.
             post(`${this.getTeamNeededRoute(teamId)}/members/ids`).
-- 
cgit v1.2.3-1-g7c22

