Airgram

Guides
/
/
Methods

api.openChat()

Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats)

Parameters OpenChatParams:

NameTypeDescription
chatIdnumber Chat identifier
Returns ApiResponse interface:
interface ApiResponse {
  _: 'openChat' | 'error'
  airgram: Airgram
  request: {
    method: 'openChat'
    params: OpenChatParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}