Layer 220
MessagesSetHistoryTtl
Set maximum Time-To-Live of all messages in the specified chat
method
Users
messages.setHistoryTTL#b80e5fe4 peer:InputPeer period:int = Updates;
Parameters
| Name | Type | Description |
|---|---|---|
| Peer | InputPeer | The dialog |
| Period | int | Automatically delete all messages sent in the chat after this many seconds |
Returns
UpdatesPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CHAT_NOT_MODIFIED | No changes were made to chat information because the new information you passed is identical to the current information. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | TTL_PERIOD_INVALID | The specified TTL period is invalid. |
Gogram Example
// MessagesSetHistoryTtl - positional arguments result, err := client.MessagesSetHistoryTtl(&tg.InputPeerUser{UserID: int64(123456789)}, 0) if err != nil { // handle error } // result is *tg.Updates