messages.readEncryptedHistory
Marks message history within a secret chat as read.
func (c *Client) MessagesReadEncryptedHistory(ctx context.Context, request *MessagesReadEncryptedHistoryRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesReadEncryptedHistory(ctx, &tg.MessagesReadEncryptedHistoryRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputEncryptedChat | yes | Secret chat ID |
MaxDate | int | yes | Maximum date value for received messages in history |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHAT_ID_INVALID | The provided chat id is invalid. |
| 400 | MAX_DATE_INVALID | The specified maximum date is invalid. |
| 400 | MSG_WAIT_FAILED | A waiting call returned an error. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.readEncryptedHistory#7f4b690a