diff --git a/lib/BigBlueButton/API.php b/lib/BigBlueButton/API.php index a057895..7711465 100644 --- a/lib/BigBlueButton/API.php +++ b/lib/BigBlueButton/API.php @@ -188,6 +188,10 @@ class API { $invitationUrl = $this->urlHelper->linkToInvitationAbsolute($room); $createMeetingParams->setModeratorOnlyMessage($this->l10n->t('To invite someone to the meeting, send them this link: %s', [$invitationUrl])); + if (!empty($room->logoutURL)) { + $createMeetingParams->setLogoutURL($this->urlGenerator->getBaseUrl()); + } + if (!empty($room->welcome)) { $createMeetingParams->setWelcome($room->welcome); } diff --git a/lib/Service/RoomService.php b/lib/Service/RoomService.php index c98f1fc..a9e0b6f 100644 --- a/lib/Service/RoomService.php +++ b/lib/Service/RoomService.php @@ -8,7 +8,6 @@ use OCA\BigBlueButton\Db\Room; use OCA\BigBlueButton\Db\RoomMapper; use OCA\BigBlueButton\Event\RoomCreatedEvent; -use OCP\IURLGenerator; use OCA\BigBlueButton\Event\RoomDeletedEvent; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\MultipleObjectsReturnedException; @@ -18,9 +17,6 @@ use OCP\Security\ISecureRandom; class RoomService { - /** @var IURLGenerator */ - private $urlGenerator; - /** @var RoomMapper */ private $mapper; @@ -34,12 +30,10 @@ class RoomService { private $random; public function __construct( - IURLGenerator $urlGenerator, RoomMapper $mapper, IConfig $config, IEventDispatcher $eventDispatcher, ISecureRandom $random) { - $this->urlGenerator = $urlGenerator; $this->mapper = $mapper; $this->config = $config; $this->eventDispatcher = $eventDispatcher; @@ -109,7 +103,7 @@ class RoomService { $room->setMediaCheck($mediaCheck); $room->setCleanLayout(false); $room->setJoinMuted(false); - $room->setLogoutURL($this->urlGenerator->getBaseUrl()); + $room->setLogoutURL(''); if ($access === Room::ACCESS_PASSWORD) { $room->setPassword($this->humanReadableRandom(8));