messages.unpinAllMessages #

Unpin all pinned messages

Layer 223

messages.affectedHistory#b45c69d1 pts:int pts_count:int offset:int = messages.AffectedHistory;
---functions---
messages.unpinAllMessages#62dd747 flags:# peer:InputPeer top_msg_id:flags.0?int saved_peer_id:flags.1?InputPeer = messages.AffectedHistory;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
peerInputPeerChat where to unpin
top_msg_idflags.0?intForum topic where to unpin
saved_peer_idflags.1?InputPeerIf set, must be equal to the ID of a monoforum topic, and will unpin all messages pinned in the passed monoforum topic.

Result #

messages.AffectedHistory

Both users and bots can use this method #

Possible errors #

CodeTypeDescription
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400CHAT_NOT_MODIFIEDNo changes were made to chat information because the new information you passed is identical to the current information.
400INPUT_USER_DEACTIVATEDThe specified user was deleted.
400PEER_ID_INVALIDThe provided peer id is invalid.

Forum topics #

Telegram allows creating forums with multiple distinct topics.

Direct messages to channels #

Telegram supports direct messages to channels, which can also be used to suggest (even paid) channel posts.

Pinned messages #

Telegram allows pinning multiple messages on top of a specific chat.