Airgram

Guides
/
/
Methods

api.searchChats()

Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the main chat list

Parameters SearchChatsParams:

NameTypeDescription
querystring Query to search for. If the query is empty, returns up to 50 recently found chats
limitnumber The maximum number of chats to be returned
Returns ApiResponse interface:
interface ApiResponse {
  _: 'searchChats' | 'error'
  airgram: Airgram
  request: {
    method: 'searchChats'
    params: SearchChatsParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}