Skip to content

Commit

Permalink
Merge pull request #12241 from nextcloud/backport/12198/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(signaling): Make alluserids more reliable for testing
  • Loading branch information
nickvergessen authored Apr 29, 2024
2 parents 7fd8e34 + 8e56007 commit a4fd92a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/Signaling/BackendNotifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ public function roomInvited(Room $room, array $attendees): void {
* @throws \Exception
*/
public function roomsDisinvited(Room $room, array $attendees): void {
$allUserIds = $this->participantService->getParticipantUserIds($room);
sort($allUserIds);
$userIds = [];
foreach ($attendees as $attendee) {
if ($attendee->getActorType() === Attendee::ACTOR_USERS) {
Expand All @@ -206,7 +208,7 @@ public function roomsDisinvited(Room $room, array $attendees): void {
'userids' => $userIds,
// TODO(fancycode): We should try to get rid of 'alluserids' and
// find a better way to notify existing users to update the room.
'alluserids' => $this->participantService->getParticipantUserIds($room),
'alluserids' => $allUserIds,
'properties' => $room->getPropertiesForSignaling('', false),
],
]);
Expand All @@ -227,14 +229,16 @@ public function roomsDisinvited(Room $room, array $attendees): void {
* @throws \Exception
*/
public function roomSessionsRemoved(Room $room, array $sessionIds): void {
$allUserIds = $this->participantService->getParticipantUserIds($room);
sort($allUserIds);
$start = microtime(true);
$this->backendRequest($room, [
'type' => 'disinvite',
'disinvite' => [
'sessionids' => $sessionIds,
// TODO(fancycode): We should try to get rid of 'alluserids' and
// find a better way to notify existing users to update the room.
'alluserids' => $this->participantService->getParticipantUserIds($room),
'alluserids' => $allUserIds,
'properties' => $room->getPropertiesForSignaling('', false),
],
]);
Expand Down

0 comments on commit a4fd92a

Please sign in to comment.