Layer 220
method Users Business
messages.readHistory#e306d3a peer:InputPeer max_id:int = messages.AffectedMessages;

Parameters

Name Type Description
Peer InputPeer Target user or group
MaxId int If a positive value is passed, only messages with identifiers less or equal than the given one will be read

Possible Errors

Code Type Description
400 BUSINESS_CONNECTION_INVALID The connection_id passed to the wrapping invoke With Business Connection call is invalid.
400 CHANNEL_PRIVATE You haven't joined this channel/supergroup.
400 CHAT_ID_INVALID The provided chat id is invalid.
400 MSG_ID_INVALID Invalid message ID provided.
400 PEER_ID_INVALID The provided peer id is invalid.

Gogram Example

// MessagesReadHistory - positional arguments
result, err := client.MessagesReadHistory(&tg.InputPeerUser{UserID: int64(123456789)}, 0)
if err != nil {
    // handle error
}
// result is *tg.MessagesAffectedMessages