diff options
author | Joas Schilling <coding@schilljs.com> | 2023-01-05 07:37:06 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-01-19 08:26:26 +0100 |
commit | 463bdce026c7d4f77853d65b6975aa266f46eaa7 (patch) | |
tree | 937861a20c6f15e7d18a28fe701e5f9967f74afa /lib | |
parent | 4dcf99034689b6467e2b0b283eda0f3fa194bf02 (diff) |
fix(test): Don't require a specific order of breakout rooms on the API
Breakout rooms are created all within one second,
and all their last activity is the same second,
so the list might be wrongly ordered in postgres.
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Service/BreakoutRoomService.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Service/BreakoutRoomService.php b/lib/Service/BreakoutRoomService.php index e3400f74d..caf3c8bcd 100644 --- a/lib/Service/BreakoutRoomService.php +++ b/lib/Service/BreakoutRoomService.php @@ -202,6 +202,9 @@ class BreakoutRoomService { $breakoutRooms = $this->manager->getMultipleRoomsByObject(BreakoutRoom::PARENT_OBJECT_TYPE, $parent->getToken()); $amount = count($breakoutRooms); + usort($breakoutRooms, static function (Room $roomA, Room $roomB) { + return $roomA->getId() - $roomB->getId(); + }); $cleanedMap = $this->parseAttendeeMap($attendeeMap, $amount); $attendeeIds = array_keys($cleanedMap); |