mirror of https://github.com/sualko/cloud_bbb
feat: add meeting started event
parent
f74ba3794b
commit
79921b6061
|
@ -9,6 +9,8 @@ use BigBlueButton\Parameters\GetRecordingsParameters;
|
||||||
use BigBlueButton\Core\Record;
|
use BigBlueButton\Core\Record;
|
||||||
use BigBlueButton\Parameters\DeleteRecordingsParameters;
|
use BigBlueButton\Parameters\DeleteRecordingsParameters;
|
||||||
use BigBlueButton\Parameters\IsMeetingRunningParameters;
|
use BigBlueButton\Parameters\IsMeetingRunningParameters;
|
||||||
|
use OCP\EventDispatcher\IEventDispatcher;
|
||||||
|
use OCA\BigBlueButton\Event\MeetingStartedEvent;
|
||||||
use OCA\BigBlueButton\Db\Room;
|
use OCA\BigBlueButton\Db\Room;
|
||||||
use OCA\BigBlueButton\Permission;
|
use OCA\BigBlueButton\Permission;
|
||||||
use OCA\BigBlueButton\Crypto;
|
use OCA\BigBlueButton\Crypto;
|
||||||
|
@ -31,16 +33,21 @@ class API {
|
||||||
/** @var Crypto */
|
/** @var Crypto */
|
||||||
private $crypto;
|
private $crypto;
|
||||||
|
|
||||||
|
/** @var IEventDispatcher */
|
||||||
|
private $eventDispatcher;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
IConfig $config,
|
IConfig $config,
|
||||||
IURLGenerator $urlGenerator,
|
IURLGenerator $urlGenerator,
|
||||||
Permission $permission,
|
Permission $permission,
|
||||||
Crypto $crypto
|
Crypto $crypto,
|
||||||
|
IEventDispatcher $eventDispatcher
|
||||||
) {
|
) {
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->urlGenerator = $urlGenerator;
|
$this->urlGenerator = $urlGenerator;
|
||||||
$this->permission = $permission;
|
$this->permission = $permission;
|
||||||
$this->crypto = $crypto;
|
$this->crypto = $crypto;
|
||||||
|
$this->eventDispatcher = $eventDispatcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getServer() {
|
private function getServer() {
|
||||||
|
@ -96,6 +103,10 @@ class API {
|
||||||
throw new \Exception('Can not create meeting');
|
throw new \Exception('Can not create meeting');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($response->getMessageKey() !== 'duplicateWarning') {
|
||||||
|
$this->eventDispatcher->dispatch(MeetingStartedEvent::class, new MeetingStartedEvent($room));
|
||||||
|
}
|
||||||
|
|
||||||
return $response->getCreationTime();
|
return $response->getCreationTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace OCA\BigBlueButton\Event;
|
||||||
|
|
||||||
|
class MeetingStartedEvent extends RoomEvent {
|
||||||
|
}
|
Loading…
Reference in New Issue