summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2023-01-26 23:43:01 +0100
committerGitHub <noreply@github.com>2023-01-26 23:43:01 +0100
commit34b1cb830f61c7d3551f42224c601ee9e6fde84d (patch)
tree99954c78702428d0f52120ec699e88a36416eb6a /lib
parent910145e019ecf589745819c661bd8666e869b54e (diff)
parent1f877eb892c4e1fe4c16e80ff3262fc07bb86567 (diff)
Merge pull request #8602 from nextcloud/feature/stop-recording-after-end-call
Stop recording after end call
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 d4706637c..52a54725e 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();