From e14ff787d44f2f71ff3bcc759f0e77198145acf7 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Tue, 6 Sep 2022 10:56:31 +1000 Subject: [PATCH] chore: update strings of moderator to admins until we have mods support --- _locales/en/messages.json | 18 +++++++++--------- .../open_group_api/sogsv3/sogsV3BatchPoll.ts | 5 +++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 3f0173299..7b980ce80 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -240,8 +240,8 @@ "cannotRemoveCreatorFromGroup": "Cannot remove this user", "cannotRemoveCreatorFromGroupDesc": "You cannot remove this user as they are the creator of the group.", "noContactsForGroup": "You don't have any contacts yet", - "failedToAddAsModerator": "Failed to add user as moderator", - "failedToRemoveFromModerator": "Failed to remove user from the moderator list", + "failedToAddAsModerator": "Failed to add user as admin", + "failedToRemoveFromModerator": "Failed to remove user from the admin list", "copyMessage": "Copy message text", "selectMessage": "Select message", "editGroup": "Edit group", @@ -297,15 +297,15 @@ "editProfileModalTitle": "Profile", "groupNamePlaceholder": "Group Name", "inviteContacts": "Invite Contacts", - "addModerators": "Add Moderators", - "removeModerators": "Remove Moderators", - "addAsModerator": "Add as Moderator", - "removeFromModerators": "Remove From Moderators", + "addModerators": "Add Admins", + "removeModerators": "Remove Admins", + "addAsModerator": "Add as Admin", + "removeFromModerators": "Remove From Admins", "add": "Add", "addingContacts": "Adding contacts to $name$", "noContactsToAdd": "No contacts to add", "noMembersInThisGroup": "No other members in this group", - "noModeratorsToRemove": "no moderators to remove", + "noModeratorsToRemove": "no admins to remove", "onlyAdminCanRemoveMembers": "You are not the creator", "onlyAdminCanRemoveMembersDesc": "Only the creator of the group can remove users", "createAccount": "Create account", @@ -352,8 +352,8 @@ "pickClosedGroupMember": "Please pick at least 1 group member", "closedGroupMaxSize": "A closed group cannot have more than 100 members", "noBlockedContacts": "No blocked contacts", - "userAddedToModerators": "User added to moderator list", - "userRemovedFromModerators": "User removed from moderator list", + "userAddedToModerators": "User added to admin list", + "userRemovedFromModerators": "User removed from admin list", "orJoinOneOfThese": "Or join one of these...", "helpUsTranslateSession": "Help us Translate Session", "translation": "Translation", diff --git a/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts b/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts index 4c0589bc7..7461b16f4 100644 --- a/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts +++ b/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts @@ -282,13 +282,14 @@ const makeBatchRequestPayload = ( method: 'POST', path: `/user/${sessionId}/moderator`, + // An admin has moderator permissions automatically, but removing his admin permissions only will keep him as a moderator. + // We do not want this currently. When removing an admin from Session Desktop we want to remove all his permissions server side. + // We'll need to build a complete dialog with options to make the whole admins/moderator/global/visible/hidden logic work as the server was built for. json: { rooms: [options.addRemoveModerators.roomId], global: false, 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, }, }));