Skip to content

Commit

Permalink
Fix SpeechToTextReferenceListener: Allow userId to be null
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Feb 23, 2024
1 parent 25705fe commit 1d9bd9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Listener/SpeechToText/SpeechToTextReferenceListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
class SpeechToTextReferenceListener implements IEventListener {
public function __construct(
private IConfig $config,
private string $userId,
private ?string $userId,
private ISpeechToTextManager $sttProcessingManager,
) {
}
Expand All @@ -47,7 +47,7 @@ public function handle(Event $event): void {
return;
}
if ($this->config->getAppValue(Application::APP_ID, 'speech_to_text_picker_enabled', '1') === '1' &&
$this->config->getUserValue($this->userId, Application::APP_ID, 'speech_to_text_picker_enabled', '1') === '1') {
($this->userId === null || $this->config->getUserValue($this->userId, Application::APP_ID, 'speech_to_text_picker_enabled', '1') === '1')) {

// Double check that atleast one provider is registered
if ($this->sttProcessingManager->hasProviders()) {
Expand Down

0 comments on commit 1d9bd9c

Please sign in to comment.