Skip to content

Commit

Permalink
fix: Set all rich object parameter values to string
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <kate@provokateurin.de>
  • Loading branch information
provokateurin committed Apr 6, 2024
1 parent 0a7be80 commit a64826e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions lib/Chat/Parser/SystemMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
];
Expand All @@ -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) {
}
Expand Down
6 changes: 3 additions & 3 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<operations['chat-receive-messages']['parameters']['query']>['params']
Expand Down

0 comments on commit a64826e

Please sign in to comment.