Compare commits

...

3 Commits

Author SHA1 Message Date
Nextcloud bot 73e6e48255
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-01 18:34:11 +00:00
sualko d446db0ea4 feat: add source meta params
to identify origin of room creation

fix #184
2021-12-01 15:05:07 +01:00
sualko 2a47452e7c fix: enable media check for new rooms by default 2021-12-01 14:54:35 +01:00
5 changed files with 26 additions and 3 deletions

View File

@ -26,6 +26,9 @@ OC.L10N.register(
"Save" : "Salva",
"Show room manager in app navigation instead of settings page." : "Mostra il gestore della stanza nella pagina di navigazione dell'applicazioni invece della pagina delle impostazioni.",
"Use Nextcloud theme in BigBlueButton." : "Usa il tema di Nextcloud in BigBlueButton.",
"Default Room Settings" : "Impostazioni predefinite della stanza",
"Below you can change some default values, which are used to create a new room." : "Sotto puoi cambiare alcuni valori predefiniti che vengono usati per creare una stanza nuova.",
"Perform media check before usage" : "Fai un controllo del media prima dell'uso",
"Community" : "Comunità",
"Are you enjoying this app? Give something back to the open source community." : "Ti piace questa applicazione? Restituisci qualcosa alla comunità open source.",
"Checkout the contributor guide" : "Controlla la guida del collaboratore",

View File

@ -24,6 +24,9 @@
"Save" : "Salva",
"Show room manager in app navigation instead of settings page." : "Mostra il gestore della stanza nella pagina di navigazione dell'applicazioni invece della pagina delle impostazioni.",
"Use Nextcloud theme in BigBlueButton." : "Usa il tema di Nextcloud in BigBlueButton.",
"Default Room Settings" : "Impostazioni predefinite della stanza",
"Below you can change some default values, which are used to create a new room." : "Sotto puoi cambiare alcuni valori predefiniti che vengono usati per creare una stanza nuova.",
"Perform media check before usage" : "Fai un controllo del media prima dell'uso",
"Community" : "Comunità",
"Are you enjoying this app? Give something back to the open source community." : "Ti piace questa applicazione? Restituisci qualcosa alla comunità open source.",
"Checkout the contributor guide" : "Controlla la guida del collaboratore",

View File

@ -9,14 +9,17 @@ use BigBlueButton\Parameters\DeleteRecordingsParameters;
use BigBlueButton\Parameters\GetRecordingsParameters;
use BigBlueButton\Parameters\IsMeetingRunningParameters;
use BigBlueButton\Parameters\JoinMeetingParameters;
use OCA\BigBlueButton\AppInfo\Application;
use OCA\BigBlueButton\Crypto;
use OCA\BigBlueButton\Db\Room;
use OCA\BigBlueButton\Event\MeetingStartedEvent;
use OCA\BigBlueButton\UrlHelper;
use OCP\App\IAppManager;
use OCP\Defaults;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IRequest;
use OCP\IURLGenerator;
class API {
@ -44,6 +47,12 @@ class API {
/** @var Defaults */
private $defaults;
/** @var IAppManager */
private $appManager;
/** @var IRequest */
private $request;
public function __construct(
IConfig $config,
IURLGenerator $urlGenerator,
@ -51,7 +60,9 @@ class API {
IEventDispatcher $eventDispatcher,
IL10N $l10n,
UrlHelper $urlHelper,
Defaults $defaults
Defaults $defaults,
IAppManager $appManager,
IRequest $request
) {
$this->config = $config;
$this->urlGenerator = $urlGenerator;
@ -60,6 +71,8 @@ class API {
$this->l10n = $l10n;
$this->urlHelper = $urlHelper;
$this->defaults = $defaults;
$this->appManager = $appManager;
$this->request = $request;
}
private function getServer(): BigBlueButton {
@ -150,6 +163,10 @@ class API {
$createMeetingParams->setLogoutUrl($this->urlGenerator->getBaseUrl());
$createMeetingParams->setMuteOnStart($room->getJoinMuted());
$createMeetingParams->addMeta('bbb-origin-version', $this->appManager->getAppVersion(Application::ID));
$createMeetingParams->addMeta('bbb-origin', \method_exists($this->defaults, 'getProductName') ? $this->defaults->getProductName() : 'Nextcloud');
$createMeetingParams->addMeta('bbb-origin-server-name', $this->request->getServerHost());
$mac = $this->crypto->calculateHMAC($room->uid);
$endMeetingUrl = $this->urlGenerator->linkToRouteAbsolute('bbb.hook.meetingEnded', ['token' => $room->uid, 'mac' => $mac]);

View File

@ -82,7 +82,7 @@ class RoomService {
public function create(string $name, string $welcome, int $maxParticipants, bool $record, string $access, string $userId): \OCP\AppFramework\Db\Entity {
$room = new Room();
$mediaCheck = $this->config->getAppValue('bbb', 'join.mediaCheck') === 'true';
$mediaCheck = $this->config->getAppValue('bbb', 'join.mediaCheck', 'true') === 'true';
$room->setUid(\OC::$server->getSecureRandom()->generate(16, \OCP\Security\ISecureRandom::CHAR_HUMAN_READABLE));
$room->setName($name);

View File

@ -30,7 +30,7 @@ class Admin implements ISettings {
'app.navigation' => $this->config->getAppValue('bbb', 'app.navigation') === 'true' ? 'checked' : '',
'join.theme' => $this->config->getAppValue('bbb', 'join.theme') === 'true' ? 'checked' : '',
'app.shortener' => $this->config->getAppValue('bbb', 'app.shortener'),
'join.mediaCheck' => $this->config->getAppValue('bbb', 'join.mediaCheck') === 'true' ? 'checked' : '',
'join.mediaCheck' => $this->config->getAppValue('bbb', 'join.mediaCheck', 'true') === 'true' ? 'checked' : '',
];
return new TemplateResponse('bbb', 'admin', $parameters);