From ad2d2afcf79d4aa4b2b1107e91a1be81f17890ed Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 23 Jul 2024 16:26:58 +0200 Subject: [PATCH] fix(chat): Fix OpenAPI optional attributes Signed-off-by: Joas Schilling --- lib/Controller/ChatController.php | 2 +- lib/ResponseDefinitions.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Controller/ChatController.php b/lib/Controller/ChatController.php index 6c4570667..75315384b 100644 --- a/lib/Controller/ChatController.php +++ b/lib/Controller/ChatController.php @@ -1116,7 +1116,7 @@ class ChatController extends AEnvironmentAwareController { $data['status'] = $statuses[$data['id']]->getStatus(); $data['statusIcon'] = $statuses[$data['id']]->getIcon(); $data['statusMessage'] = $statuses[$data['id']]->getMessage(); - $data['statusClearAt'] = $statuses[$data['id']]->getClearAt(); + $data['statusClearAt'] = $statuses[$data['id']]->getClearAt()?->getTimestamp(); } $output[] = $data; diff --git a/lib/ResponseDefinitions.php b/lib/ResponseDefinitions.php index 12efb2d1e..982920d12 100644 --- a/lib/ResponseDefinitions.php +++ b/lib/ResponseDefinitions.php @@ -60,10 +60,10 @@ namespace OCA\Talk; * id: string, * label: string, * source: string, - * status: ?string, - * statusClearAt: ?int, - * statusIcon: ?string, - * statusMessage: ?string, + * status?: string, + * statusClearAt?: ?int, + * statusIcon?: ?string, + * statusMessage?: ?string, * } * * @psalm-type TalkChatMessage = array{