messages.ReadHistory

class pyrogram.raw.functions.messages.ReadHistory

Marks message history as read.

Details:
  • Layer: 227

  • 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
├── peer → InputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_id → long
│ ├── InputPeerUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ ├── InputPeerChannel
│ │ ├── channel_id → long
│ │ └── access_hash → long
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── user_id → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── channel_id → long
└── max_id → int

Example

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