messages.toggleSavedDialogPin
Pin or unpin a saved message dialog ».
func (c *Client) MessagesToggleSavedDialogPin(ctx context.Context, request *MessagesToggleSavedDialogPinRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesToggleSavedDialogPin(ctx, &tg.MessagesToggleSavedDialogPinRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Pinned | bool | — | Whether to pin or unpin the dialog |
Peer | InputDialogPeerClass | yes | The dialog to pin |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.toggleSavedDialogPin#ac81bbde