fix: use stable cursors for platform pagination

This commit is contained in:
2026-09-22 10:59:31 +08:00
parent d7f0e7c8d6
commit 03f6764427
8 changed files with 320 additions and 42 deletions
@@ -0,0 +1,28 @@
REQUEST first GET http://127.0.0.1:18091/v1/data/accounts/account-cursor/messages?chat_id=chat-cursor&limit=1
HTTP 200
{
"items": [
{
"message_id": "message-2",
"source_time": "2026-01-01T00:00:02Z",
"text": "fixture-two"
}
],
"limit": 1,
"has_more": true,
"next_cursor": "eyJ2IjoxLCJraW5kIjoibWVzc2FnZXMiLCJjaGF0X2lkIjoiY2hhdC1jdXJzb3IiLCJzb3J0X3RpbWUiOiIyMDI2LTAxLTAxVDAwOjAwOjAyWiIsIm1lc3NhZ2VfaWQiOiJtZXNzYWdlLTIifQ"
}
REQUEST second GET http://127.0.0.1:18091/v1/data/accounts/account-cursor/messages?chat_id=chat-cursor&limit=10&cursor=eyJ2IjoxLCJraW5kIjoibWVzc2FnZXMiLCJjaGF0X2lkIjoiY2hhdC1jdXJzb3IiLCJzb3J0X3RpbWUiOiIyMDI2LTAxLTAxVDAwOjAwOjAyWiIsIm1lc3NhZ2VfaWQiOiJtZXNzYWdlLTIifQ
HTTP 200
{
"items": [
{
"message_id": "message-1",
"source_time": "2026-01-01T00:00:01Z",
"text": "fixture-one"
}
],
"limit": 10,
"has_more": false,
"next_cursor": ""
}