Beispiel #1
0
        public async Task <IMessages> GetHistoryAsync(IInputPeer peer, int offset, int maxId, int limit)
        {
            EnsureUserAuthorized();

            var req = new RequestGetHistory
            {
                Peer      = peer,
                AddOffset = offset,
                MaxId     = maxId,
                Limit     = limit
            };

            return(await SenderService.SendRequestAsync(req).ConfigureAwait(false));
        }
        /// <inheritdoc />
        public async Task <IMessages> GetHistoryAsync(IInputPeer peer, int offset, int maxId, int limit, CancellationToken cancellationToken = default(CancellationToken))
        {
            ClientSettings.EnsureUserAuthorized();

            var req = new RequestGetHistory
            {
                Peer      = peer,
                AddOffset = offset,
                MaxId     = maxId,
                Limit     = limit
            };

            return(await RequestSender.SendRequestAsync(req, cancellationToken).ConfigureAwait(false));
        }