diff options
author | Joas Schilling <coding@schilljs.com> | 2021-09-01 13:20:50 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-10-07 19:18:29 +0300 |
commit | 20d722901fb244166b4b78535e4058c1910c93b5 (patch) | |
tree | 583cc56e36ad739ea3385106c2ce106a425cab72 /lib/Service | |
parent | 4b3549db1f60048e93410b572a53fdaa4c9b90a4 (diff) |
Allow setting publishing permissions for all users
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Service')
-rw-r--r-- | lib/Service/ParticipantService.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php index 90b5712c3..491ab7093 100644 --- a/lib/Service/ParticipantService.php +++ b/lib/Service/ParticipantService.php @@ -158,6 +158,17 @@ class ParticipantService { $this->dispatcher->dispatch(Room::EVENT_AFTER_PARTICIPANT_PUBLISHING_PERMISSIONS_SET, $event); } + public function updateAllPublishingPermissions(Room $room, string $mode, int $newState, bool $includeModerators): void { + // FIXME Add events after checking what should be sent to the HPB + // $event = new ModifyParticipantEvent($room, $participant, 'publishingPermissions', $newState, $oldState); + // $this->dispatcher->dispatch(Room::EVENT_BEFORE_PARTICIPANT_PUBLISHING_PERMISSIONS_SET, $event); + + $this->attendeeMapper->modifyPublishingPermissions($room->getId(), $mode, $newState, $includeModerators); + + // FIXME Add events after checking what should be sent to the HPB + // $this->dispatcher->dispatch(Room::EVENT_AFTER_PARTICIPANT_PUBLISHING_PERMISSIONS_SET, $event); + } + public function updateLastReadMessage(Participant $participant, int $lastReadMessage): void { $attendee = $participant->getAttendee(); $attendee->setLastReadMessage($lastReadMessage); |