Airgram

Guides
/
/
Methods

api.addChatToList()

Adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed

Parameters AddChatToListParams:

NameTypeDescription
chatIdnumber Chat identifier
chatList The chat list. Use getChatListsToAddChat to get suitable chat lists
Returns ApiResponse interface:
interface ApiResponse {
  _: 'addChatToList' | 'error'
  airgram: Airgram
  request: {
    method: 'addChatToList'
    params: AddChatToListParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}