From f1358c404998be9d6b8659cc128ac43e4c9bf7e0 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Tue, 6 Sep 2022 10:47:57 +1000 Subject: [PATCH] fix: make sure that removing an admin also removes the mod permission because we cannot currently choose in the app what type of admin/mod we want, it makes sense that adding/removing changes both permissions --- ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts b/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts index 073ea5f11..4c0589bc7 100644 --- a/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts +++ b/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts @@ -285,9 +285,11 @@ const makeBatchRequestPayload = ( json: { rooms: [options.addRemoveModerators.roomId], global: false, - // moderator: isAddMod, // currently we only support adding/removing visible admins visible: true, admin: isAddMod, + // currently we only support adding/removing visible admins but we still need to set the `moderator` + // permissions here so removing an admin works does not only devote an admin to a moderator + moderator: isAddMod, }, })); case 'banUnbanUser':