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);
$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);
}

View File

@ -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));