messages.toggleDialogPin #

Pin/unpin a dialog

Layer 223

boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
messages.toggleDialogPin#a731e257 flags:# pinned:flags.0?true peer:InputDialogPeer = Bool;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
pinnedflags.0?trueWhether to pin or unpin the dialog
peerInputDialogPeerThe dialog to pin

Result #

Bool

Only users can use this method #

Possible errors #

CodeTypeDescription
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400PEER_HISTORY_EMPTYYou can't pin an empty chat with a user.
400PEER_ID_INVALIDThe provided peer id is invalid.
400PINNED_DIALOGS_TOO_MUCHToo many pinned dialogs.