diff --git a/src/services/deepLinks.ts b/src/services/deepLinks.ts index 750848a3..aa0cda81 100644 --- a/src/services/deepLinks.ts +++ b/src/services/deepLinks.ts @@ -130,13 +130,23 @@ export class DeepLinkHandler { const [path, queryString] = parts[1].split("?"); const [routePath, ...pathParams] = path.split("/"); - // Parse path parameters + // Parse path parameters using route-specific configuration const params: Record = {}; if (pathParams.length > 0) { - params.id = pathParams[0]; - logger.debug( - `[DeepLink] 📍 Path parameter extracted: id=${pathParams[0]}`, - ); + // Get the correct parameter key for this route + const routeConfig = ROUTE_MAP[routePath]; + if (routeConfig?.paramKey) { + params[routeConfig.paramKey] = pathParams[0]; + logger.debug( + `[DeepLink] 📍 Path parameter extracted: ${routeConfig.paramKey}=${pathParams[0]}`, + ); + } else { + // Fallback to 'id' for backward compatibility + params.id = pathParams[0]; + logger.debug( + `[DeepLink] 📍 Path parameter extracted: id=${pathParams[0]} (fallback)`, + ); + } } // Parse query parameters