fix: logoutURL fallback for old rooms

pull/202/head
Specht, David 2022-03-18 18:34:10 +01:00
parent 5707fc4d39
commit 3d8efa7f6f
2 changed files with 5 additions and 7 deletions

View File

@ -188,6 +188,10 @@ class API {
$invitationUrl = $this->urlHelper->linkToInvitationAbsolute($room); $invitationUrl = $this->urlHelper->linkToInvitationAbsolute($room);
$createMeetingParams->setModeratorOnlyMessage($this->l10n->t('To invite someone to the meeting, send them this link: %s', [$invitationUrl])); $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)) { if (!empty($room->welcome)) {
$createMeetingParams->setWelcome($room->welcome); $createMeetingParams->setWelcome($room->welcome);
} }

View File

@ -8,7 +8,6 @@ use OCA\BigBlueButton\Db\Room;
use OCA\BigBlueButton\Db\RoomMapper; use OCA\BigBlueButton\Db\RoomMapper;
use OCA\BigBlueButton\Event\RoomCreatedEvent; use OCA\BigBlueButton\Event\RoomCreatedEvent;
use OCP\IURLGenerator;
use OCA\BigBlueButton\Event\RoomDeletedEvent; use OCA\BigBlueButton\Event\RoomDeletedEvent;
use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Db\MultipleObjectsReturnedException; use OCP\AppFramework\Db\MultipleObjectsReturnedException;
@ -18,9 +17,6 @@ use OCP\Security\ISecureRandom;
class RoomService { class RoomService {
/** @var IURLGenerator */
private $urlGenerator;
/** @var RoomMapper */ /** @var RoomMapper */
private $mapper; private $mapper;
@ -34,12 +30,10 @@ class RoomService {
private $random; private $random;
public function __construct( public function __construct(
IURLGenerator $urlGenerator,
RoomMapper $mapper, RoomMapper $mapper,
IConfig $config, IConfig $config,
IEventDispatcher $eventDispatcher, IEventDispatcher $eventDispatcher,
ISecureRandom $random) { ISecureRandom $random) {
$this->urlGenerator = $urlGenerator;
$this->mapper = $mapper; $this->mapper = $mapper;
$this->config = $config; $this->config = $config;
$this->eventDispatcher = $eventDispatcher; $this->eventDispatcher = $eventDispatcher;
@ -109,7 +103,7 @@ class RoomService {
$room->setMediaCheck($mediaCheck); $room->setMediaCheck($mediaCheck);
$room->setCleanLayout(false); $room->setCleanLayout(false);
$room->setJoinMuted(false); $room->setJoinMuted(false);
$room->setLogoutURL($this->urlGenerator->getBaseUrl()); $room->setLogoutURL('');
if ($access === Room::ACCESS_PASSWORD) { if ($access === Room::ACCESS_PASSWORD) {
$room->setPassword($this->humanReadableRandom(8)); $room->setPassword($this->humanReadableRandom(8));