summaryrefslogtreecommitdiffstats
path: root/webapp/client
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-01-18 20:54:49 +0000
committerenahum <nahumhbl@gmail.com>2017-01-18 17:54:48 -0300
commite15ae2253a15c7951c31ce0a2f9eea188ba2b639 (patch)
tree5d832b2f33f3e0ba81142d09968473262c8695d4 /webapp/client
parent2554ae4a253dfe0e66d79a2955fccdb7db041b4b (diff)
downloadchat-e15ae2253a15c7951c31ce0a2f9eea188ba2b639.tar.gz
chat-e15ae2253a15c7951c31ce0a2f9eea188ba2b639.tar.bz2
chat-e15ae2253a15c7951c31ce0a2f9eea188ba2b639.zip
PLT-5050 (WebApp): Change channel member roles. (#5076)
Admins can now Promote/Demote channel members in the Channel Manage Membersmodal.
Diffstat (limited to 'webapp/client')
-rw-r--r--webapp/client/client.jsx15
1 files changed, 15 insertions, 0 deletions
diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx
index 5104f34e2..639f2da2e 100644
--- a/webapp/client/client.jsx
+++ b/webapp/client/client.jsx
@@ -1530,6 +1530,21 @@ export default class Client {
this.track('api', 'api_channels_remove_member');
}
+ updateChannelMemberRoles(channelId, userId, newRoles, success, error) {
+ var data = {
+ user_id: userId,
+ new_roles: newRoles
+ };
+
+ request.
+ post(`${this.getChannelNeededRoute(channelId)}/update_member_roles`).
+ set(this.defaultHeaders).
+ type('application/json').
+ accept('application/json').
+ send(data).
+ end(this.handleResponse.bind(this, 'updateChannelMemberRoles', success, error));
+ }
+
// Routes for Commands
listCommands(success, error) {