IMessagesService.

ReadHistoryAsync(IInputPeer, int, CancellationToken) Method

Summary

Marks message history as read.

Syntax

Task<IAffectedMessages> ReadHistoryAsync(IInputPeer peer, int maxId, CancellationToken cancellationToken = default(CancellationToken))

Parameters

Name Type Description
peer IInputPeer User or group to receive the message
maxId int If a positive value is passed, only messages with identifiers less or equal than the given one will be read
cancellationToken CancellationToken Cancellation token

Return Value

Type Description
Task<IAffectedMessages> Returns a IAffectedMessages object containing a affected messages