From e1a660da340caba5d08bbceccdb82fbc43cc3c06 Mon Sep 17 00:00:00 2001
From: Maksim Sukharev
Date: Wed, 4 Dec 2024 10:15:16 +0100
Subject: [PATCH 1/2] fix(state): provide call recording config values with
initial state
Signed-off-by: Maksim Sukharev
---
lib/Controller/RoomController.php | 2 ++
lib/Settings/Admin/AdminSettings.php | 2 ++
2 files changed, 4 insertions(+)
diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php
index 9cd17672661..6ee8ad8287a 100644
--- a/lib/Controller/RoomController.php
+++ b/lib/Controller/RoomController.php
@@ -157,6 +157,8 @@ protected function getTalkHashHeader(): array {
$this->config->getAppValue('spreed', 'sip_bridge_dialin_info'),
$this->config->getAppValue('spreed', 'sip_bridge_shared_secret'),
$this->config->getAppValue('spreed', 'recording_consent'),
+ $this->config->getAppValue('spreed', 'call_recording_transcription'),
+ $this->config->getAppValue('spreed', 'call_recording_summary'),
$this->config->getAppValue('theming', 'cachebuster', '1'),
$this->config->getUserValue($this->userId, 'theming', 'userCacheBuster', '0'),
$this->config->getAppValue('spreed', 'federation_incoming_enabled'),
diff --git a/lib/Settings/Admin/AdminSettings.php b/lib/Settings/Admin/AdminSettings.php
index e03d0a9c75e..6039bfa842e 100644
--- a/lib/Settings/Admin/AdminSettings.php
+++ b/lib/Settings/Admin/AdminSettings.php
@@ -448,6 +448,8 @@ protected function initRecording(): void {
'uploadLimit' => is_infinite($uploadLimit) ? 0 : $uploadLimit,
]);
$this->initialState->provideInitialState('recording_consent', $this->talkConfig->getRecordingConsentConfig());
+ $this->initialState->provideInitialState('call_recording_transcription', $this->serverConfig->getAppValue('spreed', 'call_recording_transcription', 'no') === 'yes');
+ $this->initialState->provideInitialState('call_recording_summary', $this->serverConfig->getAppValue('spreed', 'call_recording_summary', 'yes') === 'yes');
}
protected function initSIPBridge(): void {
From c291f5a8e6c2b92e901c779c1378d266dea2861a Mon Sep 17 00:00:00 2001
From: Maksim Sukharev
Date: Wed, 4 Dec 2024 11:14:57 +0100
Subject: [PATCH 2/2] fix(AdminSettings): provide call recording config toggles
Signed-off-by: Maksim Sukharev
---
.../AdminSettings/RecordingServers.vue | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/src/components/AdminSettings/RecordingServers.vue b/src/components/AdminSettings/RecordingServers.vue
index f5d7b8d1e7b..364169dfa14 100644
--- a/src/components/AdminSettings/RecordingServers.vue
+++ b/src/components/AdminSettings/RecordingServers.vue
@@ -72,6 +72,26 @@
+
+
+ {{ t('spreed', 'Recording transcription') }}
+
+
+
+ {{ t('spreed', 'Automatically transcribe call recordings with a transcription provider') }}
+
+
+
+ {{ t('spreed', 'Automatically summarize call recordings with transcription and summary providers') }}
+
+
@@ -134,6 +154,8 @@ export default {
saved: false,
showForm: true,
recordingConsentSelected: loadState('spreed', 'recording_consent').toString(),
+ recordingTranscriptionEnabled: loadState('spreed', 'call_recording_transcription'),
+ recordingSummaryEnabled: loadState('spreed', 'call_recording_summary'),
debounceUpdateServers: () => {},
}
},
@@ -212,6 +234,24 @@ export default {
})
},
+ setRecordingTranscription(value) {
+ this.loading = true
+ OCP.AppConfig.setValue('spreed', 'call_recording_transcription', value ? 'yes' : 'no', {
+ success: () => {
+ this.loading = false
+ },
+ })
+ },
+
+ setRecordingSummary(value) {
+ this.loading = true
+ OCP.AppConfig.setValue('spreed', 'call_recording_summary', value ? 'yes' : 'no', {
+ success: () => {
+ this.loading = false
+ },
+ })
+ },
+
getRecordingConsentDescription(value) {
switch (value) {
case CONFIG.RECORDING_CONSENT.OPTIONAL: