diff options
author | Marcel Klehr <mklehr@gmx.net> | 2023-04-19 12:35:13 +0200 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2023-04-19 12:35:13 +0200 |
commit | a2f5421fc3eb13ed28167e97483fa7eaa4e65841 (patch) | |
tree | eec8142c6eb4c88afb3309361a23c64a2d07a554 /lib/public/SpeechToText/Events | |
parent | a8b27c91265a883aaa1563c33edf8d6917af63b1 (diff) | |
download | nextcloud-server-a2f5421fc3eb13ed28167e97483fa7eaa4e65841.tar.gz nextcloud-server-a2f5421fc3eb13ed28167e97483fa7eaa4e65841.zip |
SpeechToTextManager#scheduleFileTranscription: Take context params and expose them on the Transcription*Events
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib/public/SpeechToText/Events')
3 files changed, 24 insertions, 4 deletions
diff --git a/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php b/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php index 0f906a7604b..74164791b32 100644 --- a/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php +++ b/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php @@ -38,6 +38,8 @@ abstract class AbstractTranscriptionEvent extends Event { public function __construct( private int $fileIdId, private ?File $file, + private string $userId, + private string $appId, ) { parent::__construct(); } @@ -55,4 +57,18 @@ abstract class AbstractTranscriptionEvent extends Event { public function getFile(): ?File { return $this->file; } + + /** + * @since 27.0.0 + */ + public function getUserId(): string { + return $this->userId; + } + + /** + * @since 27.0.0 + */ + public function getAppId(): string { + return $this->appId; + } } diff --git a/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php b/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php index c29f276596e..0cdefdf5a4b 100644 --- a/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php +++ b/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php @@ -39,9 +39,11 @@ class TranscriptionFailedEvent extends AbstractTranscriptionEvent { public function __construct( int $fileId, ?File $file, - private string $errorMessage + private string $errorMessage, + string $userId, + string $appId, ) { - parent::__construct($fileId, $file); + parent::__construct($fileId, $file, $userId, $appId); } /** diff --git a/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php b/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php index 599e98a47be..79f379fca4d 100644 --- a/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php +++ b/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php @@ -39,9 +39,11 @@ class TranscriptionSuccessfulEvent extends AbstractTranscriptionEvent { public function __construct( int $fileId, ?File $file, - private string $transcript + private string $transcript, + string $userId, + string $appId, ) { - parent::__construct($fileId, $file); + parent::__construct($fileId, $file, $userId, $appId); } /** |