support bot, bots: paginate chat scan (#6935)

* bots: document APIGetChats command and CRApiChats response

* bots: regenerate API docs and TypeScript types

* simplex-chat-nodejs: add apiGetChats

* support bot: avoid OOM on large databases

apiListGroups / apiListContacts return every record in one response and
overflow V8's string allocation on large DBs. Replace list-then-find-by-id
patterns with apiGetChat(type, id, 0) lookups, and the one genuine scan
(refreshAllCards) with paginated apiGetChats, count=1000.

* support bot: update test assertions to match current message text

* bots: simplify PaginationByTime, expose only PTLast

* simplex-chat-nodejs: bump types and nodejs versions
This commit is contained in:
sh
2026-05-06 07:54:36 +00:00
committed by GitHub
parent db783d85d7
commit fefdea8ed0
22 changed files with 673 additions and 62 deletions
+1 -1
View File
@@ -993,7 +993,7 @@ data ChatPagination
deriving (Show)
data PaginationByTime
= PTLast Int
= PTLast {count :: Int}
| PTAfter UTCTime Int
| PTBefore UTCTime Int
deriving (Show)