diff --git a/lib/Chat/Parser/SystemMessage.php b/lib/Chat/Parser/SystemMessage.php index d70bb56bfa11..30ceaba620d0 100644 --- a/lib/Chat/Parser/SystemMessage.php +++ b/lib/Chat/Parser/SystemMessage.php @@ -800,11 +800,11 @@ protected function getFileFromShare(?Participant $participant, string $shareId): 'type' => 'file', 'id' => (string) $fileId, 'name' => $name, - 'size' => $size, + 'size' => (string) $size, 'path' => $path, 'link' => $url, 'etag' => $node->getEtag(), - 'permissions' => $node->getPermissions(), + 'permissions' => (string) $node->getPermissions(), 'mimetype' => $node->getMimeType(), 'preview-available' => $isPreviewAvailable ? 'yes' : 'no', ]; @@ -814,8 +814,8 @@ protected function getFileFromShare(?Participant $participant, string $shareId): try { $sizeMetadata = $this->metadataCache->getMetadataPhotosSizeForFileId($fileId); if (isset($sizeMetadata['width'], $sizeMetadata['height'])) { - $data['width'] = $sizeMetadata['width']; - $data['height'] = $sizeMetadata['height']; + $data['width'] = (string) $sizeMetadata['width']; + $data['height'] = (string) $sizeMetadata['height']; } } catch (FilesMetadataNotFoundException) { } diff --git a/src/types/index.ts b/src/types/index.ts index 02c31e341252..4f40e6e4a80e 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -43,9 +43,9 @@ export type Participant = components['schemas']['Participant'] export type Mention = RichObject<'server'|'call-type'|'icon-url'> export type File = RichObject<'size'|'path'|'link'|'mimetype'|'preview-available'> & { 'etag': string, - 'permissions': number, - 'width': number, - 'height': number, + 'permissions': string, + 'width': string, + 'height': string, } export type ChatMessage = components['schemas']['ChatMessageWithParent'] export type receiveMessagesParams = ApiOptions['params']