initializeBackend($request); if ($response !== null) { return $response; } $uuid = trim((string) ($request->get('uuid') ?? $request->post('uuid') ?? '')); if ($uuid === '') { return $this->error(__('Parameter %s can not be empty', ['uuid'])); } if (strlen($uuid) > 64 || !preg_match('/^[0-9a-zA-Z_-]+$/', $uuid)) { return $this->error(__('Parameter error')); } return $this->success('', [ 'url' => PushChannelConfigHelper::wsBaseUrl(), 'app_key' => PushChannelConfigHelper::appKey(), 'channel' => 'private-user-' . $uuid, ]); } }