Airgram

Guides
/
/
Methods

api.searchChatsOnServer()

Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list

Parameters SearchChatsOnServerParams:

NameTypeDescription
querystring Query to search for
limitnumber The maximum number of chats to be returned
Returns ApiResponse interface:
interface ApiResponse {
  _: 'searchChatsOnServer' | 'error'
  airgram: Airgram
  request: {
    method: 'searchChatsOnServer'
    params: SearchChatsOnServerParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}