diff --git a/src/routes/sessions.ts b/src/routes/sessions.ts index 4cf6acef..38bc9c02 100644 --- a/src/routes/sessions.ts +++ b/src/routes/sessions.ts @@ -590,13 +590,11 @@ export function registerSessionRoutes(app: FastifyInstance, ctx: RouteContext): updates.isPinned = body.isPinned; } if (Object.keys(updates).length === 0) { - reply.code(400); - return { error: 'No valid fields to update', code: 'INVALID_UPDATE' }; + return reply.status(400).send({ error: 'No valid fields to update', code: 'INVALID_UPDATE' }); } const updated = await sessions.updateSessionMetadata(session.id, updates); if (!updated) { - reply.code(404); - return { error: 'Session not found', code: 'NOT_FOUND' }; + return reply.status(404).send({ error: 'Session not found', code: 'NOT_FOUND' }); } return addActionHints(updated, sessions, channels); })); diff --git a/src/services/acp/local-storage.ts b/src/services/acp/local-storage.ts index 2e75d174..35c9b57f 100644 --- a/src/services/acp/local-storage.ts +++ b/src/services/acp/local-storage.ts @@ -944,14 +944,6 @@ function serializeStateLightweight(state: LocalState): SerializedState { }; } -/** - * Original serializeState kept for backward compat with the legacy cloneEvent path. - * Issue #4032: Only used by the persist path which now uses serializeStateLightweight. - */ -function serializeState(state: LocalState): SerializedState { - return serializeStateLightweight(state); -} - function deserializeState(value: unknown): LocalState { if (!isSerializedState(value)) { throw new Error('FileAcpLocalStorageProfile: invalid storage file');