Airgram

Guides
/
/
Methods

api.getChats()

Returns an ordered list of chats from the beginning of a chat list. For informational purposes only. Use loadChats and updates processing instead to maintain chat lists in a consistent state

Parameters GetChatsParams:

NameTypeDescription
chatList The chat list in which to return chats; pass null to get chats from the main chat list
limitnumber The maximum number of chats to be returned
Returns ApiResponse interface:
interface ApiResponse {
  _: 'getChats' | 'error'
  airgram: Airgram
  request: {
    method: 'getChats'
    params: GetChatsParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}