mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-19 01:16:39 +00:00
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:
co-authored by
Evgeny @ SimpleX Chat
parent
be673038ab
commit
ca114a7a2a
@@ -584,12 +584,12 @@ APIListGroups_Response = CR.GroupsList | CR.ChatCmdError
|
||||
class APIGetChats(TypedDict):
|
||||
userId: int # int64
|
||||
pendingConnections: bool
|
||||
pagination: "T.PaginationByTime"
|
||||
pagination: NotRequired["T.PaginationByTime"]
|
||||
query: "T.ChatListQuery"
|
||||
|
||||
|
||||
def APIGetChats_cmd_string(self: APIGetChats) -> str:
|
||||
return '/_get chats ' + str(self['userId']) + (' pcc=on' if self['pendingConnections'] else '') + ' ' + T.PaginationByTime_cmd_string(self['pagination']) + ' ' + json.dumps(self['query'])
|
||||
return '/_get chats ' + str(self['userId']) + (' pcc=on' if self['pendingConnections'] else '') + ((' ' + T.PaginationByTime_cmd_string(self.get('pagination'))) if self.get('pagination') is not None else '') + ' ' + json.dumps(self['query'])
|
||||
|
||||
APIGetChats_Response = CR.ApiChats | CR.ChatCmdError
|
||||
|
||||
|
||||
Reference in New Issue
Block a user