summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2023-01-25 12:24:35 -0300
committerVitor Mattos <vitor@php.rio>2023-01-25 12:24:35 -0300
commit3a8a6024a132f0caeb058f883293adb069799e28 (patch)
treeffa93fbe5be05344d3ae8178385e761cd82458b5 /lib
parentfac1de205e34905b1cfae41c47b9660af5c39ba9 (diff)
Stop recording after end call
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib')
-rw-r--r--lib/Activity/Listener.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Activity/Listener.php b/lib/Activity/Listener.php
index d56a416cd..21bc20bc9 100644
--- a/lib/Activity/Listener.php
+++ b/lib/Activity/Listener.php
@@ -33,6 +33,7 @@ use OCA\Talk\Model\Attendee;
use OCA\Talk\Participant;
use OCA\Talk\Room;
use OCA\Talk\Service\ParticipantService;
+use OCA\Talk\Service\RecordingService;
use OCA\Talk\Service\RoomService;
use OCP\Activity\IManager;
use OCP\AppFramework\Utility\ITimeFactory;
@@ -51,6 +52,7 @@ class Listener {
protected ParticipantService $participantService;
protected RoomService $roomService;
+ protected RecordingService $recordingService;
protected LoggerInterface $logger;
@@ -61,6 +63,7 @@ class Listener {
ChatManager $chatManager,
ParticipantService $participantService,
RoomService $roomService,
+ RecordingService $recordingService,
LoggerInterface $logger,
ITimeFactory $timeFactory) {
$this->activityManager = $activityManager;
@@ -68,6 +71,7 @@ class Listener {
$this->chatManager = $chatManager;
$this->participantService = $participantService;
$this->roomService = $roomService;
+ $this->recordingService = $recordingService;
$this->logger = $logger;
$this->timeFactory = $timeFactory;
}
@@ -146,6 +150,9 @@ class Listener {
return false;
}
+ if ($room->getCallRecording() !== Room::RECORDING_NONE) {
+ $this->recordingService->stop($room);
+ }
if ($actor instanceof Participant) {
$actorId = $actor->getAttendee()->getActorId();
$actorType = $actor->getAttendee()->getActorType();