From d34fb518a1cdff943cd675f68e1d99d8dc437258 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 21 Jan 2021 10:58:06 +0100 Subject: Fix "Undefined index: userId" Regression from the participant rewrite Signed-off-by: Joas Schilling --- lib/Collaboration/Resources/Listener.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/Collaboration') diff --git a/lib/Collaboration/Resources/Listener.php b/lib/Collaboration/Resources/Listener.php index 57f8be678..35aeb511c 100644 --- a/lib/Collaboration/Resources/Listener.php +++ b/lib/Collaboration/Resources/Listener.php @@ -28,6 +28,7 @@ use OCA\Talk\Events\RemoveParticipantEvent; use OCA\Talk\Events\RemoveUserEvent; use OCA\Talk\Events\RoomEvent; use OCA\Talk\GuestManager; +use OCA\Talk\Model\Attendee; use OCA\Talk\Room; use OCP\Collaboration\Resources\IManager; use OCP\Collaboration\Resources\ResourceException; @@ -65,8 +66,8 @@ class Listener { $participants = $event->getParticipants(); foreach ($participants as $participant) { $user = null; - if ($participant['userId'] !== '') { - $user = $userManager->get($participant['userId']); + if ($participant['actorType'] === Attendee::ACTOR_USERS) { + $user = $userManager->get($participant['actorId']); } $resourceManager->invalidateAccessCacheForResourceByUser($resource, $user); -- cgit v1.2.3