messages.deleteSavedHistory
Deletes messages from a monoforum topic », or deletes messages forwarded from a specific peer to saved messages ».
func (c *Client) MessagesDeleteSavedHistory(ctx context.Context, request *MessagesDeleteSavedHistoryRequest) (*MessagesAffectedHistory, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesDeleteSavedHistory(ctx, &tg.MessagesDeleteSavedHistoryRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *MessagesAffectedHistory
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ParentPeer | InputPeerClass | — | If set, affects the messages of the passed monoforum topic », otherwise affects saved messages ». |
Peer | InputPeerClass | yes | Peer, whose messages will be deleted from saved messages », or the ID of the topic. |
MaxID | int | yes | Maximum ID of message to delete |
MinDate | int | — | Delete all messages newer than this UNIX timestamp |
MaxDate | int | — | Delete all messages older than this UNIX timestamp |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.deleteSavedHistory#4dc5085f