mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
fix(api): expose lastPlatformMessageId and importedAt in GET /api/v1/sessions/:id
Both fields are documented in chatlab-api.md but were missing from the response. lastPlatformMessageId is used as the incremental import boundary. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
419b3002c4
commit
2b0013f615
1 file changed
+3
@@ -17,6 +17,7 @@ import {
|
||||
getMemberActivity,
|
||||
getMessageTypeStats,
|
||||
executeReadonlySql,
|
||||
getLastPlatformMessageId,
|
||||
} from '@openchatlab/core'
|
||||
import { successResponse, errorResponse, sessionNotFound, exportTooLarge, sqlExecutionError, ApiError } from '../errors'
|
||||
|
||||
@@ -67,6 +68,8 @@ export function registerRestSessionRoutes(server: FastifyInstance, ctx: HttpRout
|
||||
memberCount: info.memberCount,
|
||||
firstTimestamp: info.firstMessageTs,
|
||||
lastTimestamp: info.lastMessageTs,
|
||||
lastPlatformMessageId: getLastPlatformMessageId(db),
|
||||
importedAt: info.importedAt,
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user