api.createPrivateChat()
Returns an existing chat corresponding to a given user
Parameters
CreatePrivateChatParams
:chevron_leftchevron_right
Parameters
Interface
Name | Type | Description |
---|---|---|
userId | number | User identifier |
force | boolean | If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect |
Returns
ApiResponse
interface:interface ApiResponse {
_: 'createPrivateChat' | 'error'
airgram: Airgram
request: {
method: 'createPrivateChat'
params: CreatePrivateChatParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}