core: option to limit the max number of loaded chats (#7499)

* core: option to limit the max number of loaded chats

* update bot api

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
Evgeny
2026-09-13 12:23:39 +01:00
committed by GitHub
co-authored by Evgeny @ SimpleX Chat
parent be673038ab
commit ca114a7a2a
11 changed files with 52 additions and 15 deletions
+4 -4
View File
@@ -1817,21 +1817,21 @@ Get chat previews. Supports time-based pagination — use this instead of APILis
**Parameters**:
- userId: int64
- pendingConnections: bool
- pagination: [PaginationByTime](./TYPES.md#paginationbytime)
- pagination: [PaginationByTime](./TYPES.md#paginationbytime)?
- query: [ChatListQuery](./TYPES.md#chatlistquery)
**Syntax**:
```
/_get chats <userId>[ pcc=on] <str(pagination)> <json(query)>
/_get chats <userId>[ pcc=on][ <str(pagination)>] <json(query)>
```
```javascript
'/_get chats ' + userId + (pendingConnections ? ' pcc=on' : '') + ' ' + PaginationByTime.cmdString(pagination) + ' ' + JSON.stringify(query) // JavaScript
'/_get chats ' + userId + (pendingConnections ? ' pcc=on' : '') + (pagination ? ' ' + PaginationByTime.cmdString(pagination) : '') + ' ' + JSON.stringify(query) // JavaScript
```
```python
'/_get chats ' + str(userId) + (' pcc=on' if pendingConnections else '') + ' ' + PaginationByTime_cmd_string(pagination) + ' ' + json.dumps(query) # Python
'/_get chats ' + str(userId) + (' pcc=on' if pendingConnections else '') + ((' ' + PaginationByTime_cmd_string(pagination)) if pagination is not None else '') + ' ' + json.dumps(query) # Python
```
**Responses**: