summaryrefslogtreecommitdiffstats
path: root/webapp/client
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-01-15 15:40:43 +0000
committerJoram Wilander <jwawilander@gmail.com>2017-01-15 10:40:43 -0500
commit95251258f513d076c99da164e607dae5c39b9275 (patch)
treef221aa0da7fde86153f0258c70d00aea2412db43 /webapp/client
parent2010f74a21bdc0a4838aed0268bf07dc131e410b (diff)
downloadchat-95251258f513d076c99da164e607dae5c39b9275.tar.gz
chat-95251258f513d076c99da164e607dae5c39b9275.tar.bz2
chat-95251258f513d076c99da164e607dae5c39b9275.zip
PLT-5049 (Webapp) New Channel Members UI. (#5036)
This replaces the existing Channel Members UI with one based on the Team Members UI, so that either a button, a role or a role with a menu can be displayed. Basic logic for which actions and roles are displayed is implemented, although this doesn't change behaviour or functionality at all, as that will come in later PRs. It does, however, add code to fetch the ChannelMember objects as that is necessary to provide the full set of actions and roles as intended.
Diffstat (limited to 'webapp/client')
-rw-r--r--webapp/client/client.jsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx
index ba42d7ae8..5104f34e2 100644
--- a/webapp/client/client.jsx
+++ b/webapp/client/client.jsx
@@ -1496,6 +1496,16 @@ export default class Client {
end(this.handleResponse.bind(this, 'getChannelMember', success, error));
}
+ getChannelMembersByIds(channelId, userIds, success, error) {
+ request.
+ post(`${this.getChannelNeededRoute(channelId)}/members/ids`).
+ set(this.defaultHeaders).
+ type('application/json').
+ accept('application/json').
+ send(userIds).
+ end(this.handleResponse.bind(this, 'getChannelMembersByIds', success, error));
+ }
+
addChannelMember(channelId, userId, success, error) {
request.
post(`${this.getChannelNeededRoute(channelId)}/add`).