* Changes the pinned state of a chat. You can pin up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") non-secret chats and the same number of secret chats in the main/archive chat list.
13
*/
14
class ToggleChatIsPinned extends TdFunction
15
{
16
public const TYPE_NAME = 'toggleChatIsPinned';
17
18
/**
19
* Chat identifier.
20
*
21
* @var int
22
*/
23
protected int $chatId;
24
25
/**
26
* New value of is_pinned.
27
*
28
* @var bool
29
*/
30
protected bool $isPinned;
31
32
public function __construct(int $chatId, bool $isPinned)
33
{
34
$this->chatId = $chatId;
35
$this->isPinned = $isPinned;
36
}
37
38
public static function fromArray(array $array): ToggleChatIsPinned