summaryrefslogtreecommitdiffstats
path: root/lib/Service/ParticipantService.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service/ParticipantService.php')
-rw-r--r--lib/Service/ParticipantService.php11
1 files changed, 11 insertions, 0 deletions
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[]