, array{}> * * 200: A list of dashboard entries or an empty array */ #[NoAdminRequired] public function getDashboardEvents(): DataResponse { $userId = $this->userSession->getUser()?->getUID(); $entries = $this->service->getDashboardEvents($userId); return new DataResponse($entries); } /** * Get up to 3 events in the next 7 days * sorted by their start timestamp ascending * * Required capability: `mutual-calendar-events` * * @return DataResponse, array{}>|DataResponse * * 200: A list of dashboard entries or an empty array * 403: Room is not a 1 to 1 room, room is invalid, or user is not participant */ #[NoAdminRequired] #[RequireParticipant] public function getMutualEvents(): DataResponse { $userId = $this->userSession->getUser()?->getUID(); try { $entries = $this->service->getMutualEvents($userId, $this->room); } catch (InvalidRoomException|ParticipantNotFoundException) { return new DataResponse(null, Http::STATUS_FORBIDDEN); } return new DataResponse($entries); } }