* * 200: Notification should be kept alive * 201: Dismiss call notification and show "Missed call"-notification instead * 403: Not logged in, try again with auth data sent * 404: Dismiss call notification */ #[NoAdminRequired] #[OpenAPI(tags: ['call'])] public function state(string $token): DataResponse { if ($this->userId === null) { return new DataResponse(null, Http::STATUS_FORBIDDEN); } $status = match($this->participantService->checkIfUserIsMissingCall($token, $this->userId)) { self::CASE_PARTICIPANT_JOINED, self::CASE_ROOM_NOT_FOUND => Http::STATUS_NOT_FOUND, self::CASE_MISSED_CALL => Http::STATUS_CREATED, self::CASE_STILL_CURRENT => Http::STATUS_OK, }; return new DataResponse(null, $status); } }