messages.ReadHistory

class pyrogram.raw.functions.messages.ReadHistory

Marks message history as read.

Details:
  • Layer: 223

  • ID: E306D3A

Parameters:
  • peer (InputPeer) – Target user or group

  • max_id (int 32-bit) – If a positive value is passed, only messages with identifiers less or equal than the given one will be read

Returns:

messages.AffectedMessages

TL Schema

messages.readHistory#e306d3a
peer:InputPeer
max_id:int

= messages.AffectedMessages

Parameter Tree

ReadHistory
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
└── max_idint

Example

await app.invoke(
    ReadHistory(
        peer=await app.resolve_peer(chat_id),
        max_id=0,
    )
)