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\Parameters\DeleteRecordingsParameters;
|
||||
use BigBlueButton\Parameters\IsMeetingRunningParameters;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCA\BigBlueButton\Event\MeetingStartedEvent;
|
||||
use OCA\BigBlueButton\Db\Room;
|
||||
use OCA\BigBlueButton\Permission;
|
||||
use OCA\BigBlueButton\Crypto;
|
||||
|
@ -31,16 +33,21 @@ class API {
|
|||
/** @var Crypto */
|
||||
private $crypto;
|
||||
|
||||
/** @var IEventDispatcher */
|
||||
private $eventDispatcher;
|
||||
|
||||
public function __construct(
|
||||
IConfig $config,
|
||||
IURLGenerator $urlGenerator,
|
||||
Permission $permission,
|
||||
Crypto $crypto
|
||||
Crypto $crypto,
|
||||
IEventDispatcher $eventDispatcher
|
||||
) {
|
||||
$this->config = $config;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->permission = $permission;
|
||||
$this->crypto = $crypto;
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
}
|
||||
|
||||
private function getServer() {
|
||||
|
@ -96,6 +103,10 @@ class API {
|
|||
throw new \Exception('Can not create meeting');
|
||||
}
|
||||
|
||||
if ($response->getMessageKey() !== 'duplicateWarning') {
|
||||
$this->eventDispatcher->dispatch(MeetingStartedEvent::class, new MeetingStartedEvent($room));
|
||||
}
|
||||
|
||||
return $response->getCreationTime();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace OCA\BigBlueButton\Event;
|
||||
|
||||
class MeetingStartedEvent extends RoomEvent {
|
||||
}
|
Loading…
Reference in New Issue