IMessagesService.

GetHistoryAsync(IInputPeer, int, int, int, CancellationToken) Method

Summary

Returns messages from the history of a single conversation

Syntax

Task<IMessages> GetHistoryAsync(IInputPeer peer, int offset, int maxId, int limit, CancellationToken cancellationToken = default(CancellationToken))

Parameters

Name Type Description
peer IInputPeer Target user or group
offset int Number of list elements to be skipped
maxId int If a positive value was transferred, the method will return only messages with IDs less than
limit int Number of list elements to be returned
cancellationToken CancellationToken Cancellation token

Return Value

Type Description
Task<IMessages> History messages