diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2016-01-07 10:25:56 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2016-01-07 10:25:56 -0500 |
commit | 357063044b2dc4a89a7d30601c16805880514997 (patch) | |
tree | 3d49a395b0187a3c94bcfccd9ddf22147e98caa5 /web/react/utils | |
parent | 0e7a149982f73919badd9d366d06fa699925c89f (diff) | |
download | chat-357063044b2dc4a89a7d30601c16805880514997.tar.gz chat-357063044b2dc4a89a7d30601c16805880514997.tar.bz2 chat-357063044b2dc4a89a7d30601c16805880514997.zip |
Made ChannelInviteModal pull all channel members before rendering
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/async_client.jsx | 3 | ||||
-rw-r--r-- | web/react/utils/client.jsx | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx index f218270da..0ee89b9fa 100644 --- a/web/react/utils/async_client.jsx +++ b/web/react/utils/async_client.jsx @@ -168,7 +168,7 @@ export function getMoreChannels(force) { } } -export function getChannelExtraInfo(id) { +export function getChannelExtraInfo(id, memberLimit) { let channelId; if (id) { channelId = id; @@ -185,6 +185,7 @@ export function getChannelExtraInfo(id) { client.getChannelExtraInfo( channelId, + memberLimit, (data, textStatus, xhr) => { callTracker['getChannelExtraInfo_' + channelId] = 0; diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index e1c331aff..96d1ef720 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -824,10 +824,17 @@ export function getChannelCounts(success, error) { }); } -export function getChannelExtraInfo(id, success, error) { +export function getChannelExtraInfo(id, memberLimit, success, error) { + let url = '/api/v1/channels/' + id + '/extra_info'; + + if (memberLimit) { + url += '/' + memberLimit; + } + $.ajax({ - url: '/api/v1/channels/' + id + '/extra_info', + url, dataType: 'json', + contentType: 'application/json', type: 'GET', success, error: function onError(xhr, status, err) { |