Skip to content

Commit

Permalink
Merge pull request #13939 from nextcloud/backport/13935/stable30
Browse files Browse the repository at this point in the history
  • Loading branch information
Antreesy authored Dec 4, 2024
2 parents 8c6486d + c291f5a commit 134dcda
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Controller/RoomController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 2 additions & 0 deletions lib/Settings/Admin/AdminSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
40 changes: 40 additions & 0 deletions src/components/AdminSettings/RecordingServers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,26 @@
</p>
</template>
</template>

<template v-if="servers.length">
<h3>{{ t('spreed', 'Recording transcription') }}</h3>

<!-- FIXME hidden until transcription quality is appropriate -->
<NcCheckboxRadioSwitch v-if="false"
v-model="recordingTranscriptionEnabled"
type="switch"
:disabled="loading"
@update:modelValue="setRecordingTranscription">
{{ t('spreed', 'Automatically transcribe call recordings with a transcription provider') }}
</NcCheckboxRadioSwitch>

<NcCheckboxRadioSwitch v-model="recordingSummaryEnabled"
type="switch"
:disabled="loading"
@update:modelValue="setRecordingSummary">
{{ t('spreed', 'Automatically summarize call recordings with transcription and summary providers') }}
</NcCheckboxRadioSwitch>
</template>
</template>
</section>
</template>
Expand Down Expand Up @@ -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: () => {},
}
},
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 134dcda

Please sign in to comment.