api.toggleChatIsPinned()
Changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/arhive chat list
Parameters
ToggleChatIsPinnedParams
:chevron_leftchevron_right
Parameters
Interface
Name | Type | Description |
---|---|---|
chatList | Chat list in which to change the pinned state of the chat | |
chatId | number | Chat identifier |
isPinned | boolean | True, if the chat is pinned |
Returns
ApiResponse
interface:interface ApiResponse {
_: 'toggleChatIsPinned' | 'error'
airgram: Airgram
request: {
method: 'toggleChatIsPinned'
params: ToggleChatIsPinnedParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}