summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/RoomController.php3
-rw-r--r--lib/Service/ParticipantService.php11
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php
index 37e9c873e..be1cf7e6b 100644
--- a/lib/Controller/RoomController.php
+++ b/lib/Controller/RoomController.php
@@ -1441,6 +1441,7 @@ class RoomController extends AEnvironmentAwareController {
#[NoAdminRequired]
#[RequireModeratorParticipant]
public function resendInvitations(?int $attendeeId): DataResponse {
+ /** @var Participant[] $participants */
$participants = [];
// targeting specific participant
@@ -1451,7 +1452,7 @@ class RoomController extends AEnvironmentAwareController {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
} else {
- $participants = $this->participantService->getActorsByType($this->room, Attendee::ACTOR_EMAILS);
+ $participants = $this->participantService->getParticipantsByActorType($this->room, Attendee::ACTOR_EMAILS);
}
foreach ($participants as $participant) {
diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php
index 35a565267..de482b494 100644
--- a/lib/Service/ParticipantService.php
+++ b/lib/Service/ParticipantService.php
@@ -811,6 +811,9 @@ class ParticipantService {
}
}
+ /**
+ * @return Attendee[]
+ */
public function getActorsByType(Room $room, string $actorType): array {
return $this->attendeeMapper->getActorsByType($room->getId(), $actorType);
}
@@ -1386,6 +1389,14 @@ class ParticipantService {
}
/**
+ * @return Participant[]
+ */
+ public function getParticipantsByActorType(Room $room, string $actorType): array {
+ $attendees = $this->getActorsByType($room, $actorType);
+ return array_map(static fn (Attendee $attendee) => new Participant($room, $attendee, null), $attendees);
+ }
+
+ /**
* @param IQueryBuilder $query
* @param Room $room
* @return Participant[]