From 581e6ba12adcd9b7c092f93ddf05e8b8bba5f366 Mon Sep 17 00:00:00 2001 From: Farhan Munshi <3207297+fmunshi@users.noreply.github.com> Date: Fri, 7 Aug 2020 09:31:26 -0400 Subject: [PATCH] Ignore pagination when loading group data (#4644) --- app/actions/views/channel.js | 2 +- app/mm-redux/client/client4.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/actions/views/channel.js b/app/actions/views/channel.js index 10d6f7789..6bc68b8b5 100644 --- a/app/actions/views/channel.js +++ b/app/actions/views/channel.js @@ -616,7 +616,7 @@ function loadGroupData() { } else { const [getAllGroupsAssociatedToChannelsInTeam, getGroups] = await Promise.all([ //eslint-disable-line no-await-in-loop Client4.getAllGroupsAssociatedToChannelsInTeam(team.id, true), - Client4.getGroups(true), + Client4.getGroups(true, 0, 0), ]); if (getAllGroupsAssociatedToChannelsInTeam.groups) { diff --git a/app/mm-redux/client/client4.ts b/app/mm-redux/client/client4.ts index 08b31a0f7..b118bdf38 100644 --- a/app/mm-redux/client/client4.ts +++ b/app/mm-redux/client/client4.ts @@ -2850,9 +2850,9 @@ export default class Client4 { ); }; - getGroups = async (filterAllowReference = false) => { + getGroups = async (filterAllowReference = false, page = 0, perPage = PER_PAGE_DEFAULT) => { return this.doFetch( - `${this.getBaseRoute()}/groups${buildQueryString({filter_allow_reference: filterAllowReference})}`, + `${this.getBaseRoute()}/groups${buildQueryString({filter_allow_reference: filterAllowReference, page, per_page: perPage})}`, {method: 'get'}, ); };