From e834b18a717d2cdf67db98074f377383bb9ba6d7 Mon Sep 17 00:00:00 2001 From: Marco Date: Mon, 13 Feb 2023 14:24:51 +0100 Subject: [PATCH] Add reorganize attendees service Signed-off-by: Marco --- src/services/breakoutRoomsService.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/services/breakoutRoomsService.js b/src/services/breakoutRoomsService.js index fb944590c..311d0761d 100644 --- a/src/services/breakoutRoomsService.js +++ b/src/services/breakoutRoomsService.js @@ -40,6 +40,22 @@ const configureBreakoutRooms = async function(token, mode, amount, attendeeMap) }) } +/** + * Resets the request assistance + * + * @param token the breakout room token + * @param attendeeMap A json encoded Map of attendeeId => room number (0 based) + * @return {Promise>} The array of conversations + */ +const reorganizeAttendees = async function(token, attendeeMap) { + return await axios.post(generateOcsUrl('/apps/spreed/api/v1/breakout-rooms/{token}/attendees', { + token, + }), { + attendeeMap, + } + ) +} + /** * Deletes all breakout rooms for a given conversation * @@ -133,6 +149,7 @@ const resetRequestAssistance = async function(token) { export { configureBreakoutRooms, + reorganizeAttendees, deleteBreakoutRooms, getBreakoutRooms, startBreakoutRooms,