aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/SpeechToText
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-04-19 12:39:39 +0200
committerMarcel Klehr <mklehr@gmx.net>2023-04-19 12:39:39 +0200
commitfbcd275acb1e77fc493767859418ca39972d227e (patch)
treeb487c50f88e2a68524bb39af9a8e50bb2785d9e4 /lib/public/SpeechToText
parenta2f5421fc3eb13ed28167e97483fa7eaa4e65841 (diff)
downloadnextcloud-server-fbcd275acb1e77fc493767859418ca39972d227e.tar.gz
nextcloud-server-fbcd275acb1e77fc493767859418ca39972d227e.zip
Context params: Make userId nullable
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib/public/SpeechToText')
-rw-r--r--lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php4
-rw-r--r--lib/public/SpeechToText/Events/TranscriptionFailedEvent.php2
-rw-r--r--lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php2
-rw-r--r--lib/public/SpeechToText/ISpeechToTextManager.php2
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php b/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php
index 74164791b32..11c90fad891 100644
--- a/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php
+++ b/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php
@@ -38,7 +38,7 @@ abstract class AbstractTranscriptionEvent extends Event {
public function __construct(
private int $fileIdId,
private ?File $file,
- private string $userId,
+ private ?string $userId,
private string $appId,
) {
parent::__construct();
@@ -61,7 +61,7 @@ abstract class AbstractTranscriptionEvent extends Event {
/**
* @since 27.0.0
*/
- public function getUserId(): string {
+ public function getUserId(): ?string {
return $this->userId;
}
diff --git a/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php b/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php
index 0cdefdf5a4b..8845e240e42 100644
--- a/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php
+++ b/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php
@@ -40,7 +40,7 @@ class TranscriptionFailedEvent extends AbstractTranscriptionEvent {
int $fileId,
?File $file,
private string $errorMessage,
- string $userId,
+ ?string $userId,
string $appId,
) {
parent::__construct($fileId, $file, $userId, $appId);
diff --git a/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php b/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php
index 79f379fca4d..c75fb2da9dc 100644
--- a/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php
+++ b/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php
@@ -40,7 +40,7 @@ class TranscriptionSuccessfulEvent extends AbstractTranscriptionEvent {
int $fileId,
?File $file,
private string $transcript,
- string $userId,
+ ?string $userId,
string $appId,
) {
parent::__construct($fileId, $file, $userId, $appId);
diff --git a/lib/public/SpeechToText/ISpeechToTextManager.php b/lib/public/SpeechToText/ISpeechToTextManager.php
index 85ef299ae8e..167017ead60 100644
--- a/lib/public/SpeechToText/ISpeechToTextManager.php
+++ b/lib/public/SpeechToText/ISpeechToTextManager.php
@@ -53,7 +53,7 @@ interface ISpeechToTextManager {
* @throws PreConditionNotMetException If no provider was registered but this method was still called
* @throws InvalidArgumentException If the file could not be found or is not of a supported type
*/
- public function scheduleFileTranscription(File $file, string $userId, string $appId): void;
+ public function scheduleFileTranscription(File $file, ?string $userId, string $appId): void;
/**
* @since 27.0.0