mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Context params: Make userId nullable
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
a2f5421fc3
commit
fbcd275acb
5 changed files with 6 additions and 6 deletions
|
|
@ -90,7 +90,7 @@ class SpeechToTextManager implements ISpeechToTextManager {
|
|||
return !empty($context->getSpeechToTextProviders());
|
||||
}
|
||||
|
||||
public function scheduleFileTranscription(File $file, string $userId, string $appId): void {
|
||||
public function scheduleFileTranscription(File $file, ?string $userId, string $appId): void {
|
||||
if (!$this->hasProviders()) {
|
||||
throw new PreConditionNotMetException('No SpeechToText providers have been registered');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue