From 9ec7c316d8d22284a9c4c624f8f492ff630b3efa Mon Sep 17 00:00:00 2001 From: Marc R Kellerman <9411143+mkellerman@users.noreply.github.com> Date: Thu, 3 Jan 2019 23:06:13 -0800 Subject: [PATCH] Update TelegramClient.cs --- TLSharp.Core/TelegramClient.cs | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/TLSharp.Core/TelegramClient.cs b/TLSharp.Core/TelegramClient.cs index 8f6013d..8ad5cfb 100644 --- a/TLSharp.Core/TelegramClient.cs +++ b/TLSharp.Core/TelegramClient.cs @@ -258,19 +258,19 @@ namespace TLSharp.Core return await SendRequestAsync(req); } - public async Task GetUserDialogsAsync(int offset_date = 0, int offset_id = 0, TLAbsInputPeer offset_peer = null, int limit = 100) + public async Task GetUserDialogsAsync(int offsetDate = 0, int offsetId = 0, TLAbsInputPeer offsetPeer = null, int limit = 100) { if (!IsUserAuthorized()) throw new InvalidOperationException("Authorize user first!"); - if (offset_peer == null) - offset_peer = new TLInputPeerSelf(); + if (offsetPeer == null) + offsetPeer = new TLInputPeerSelf(); var req = new TLRequestGetDialogs() { - OffsetDate = offset_date, - OffsetId = offset_id, - OffsetPeer = offset_peer, + OffsetDate = offsetDate, + OffsetId = offsetId, + OffsetPeer = offsetPeer, Limit = limit }; return await SendRequestAsync(req); @@ -324,10 +324,7 @@ namespace TLSharp.Core await _sender.SendPingAsync(); } - /// - /// messages.getHistory#dcbb8260 peer:InputPeer offset_id:int offset_date:date add_offset:int limit:int max_id:int min_id:int hash:int = messages.Messages - /// - public async Task GetHistoryAsync(TLAbsInputPeer peer, int offset_id = 0, int offset_date = 0, int add_offset = 0, int limit = 100, int max_id = 0, int min_id = 0) + public async Task GetHistoryAsync(TLAbsInputPeer peer, int offsetId = 0, int offsetDate = 0, int addOffset = 0, int limit = 100, int maxId = 0, int minId = 0) { if (!IsUserAuthorized()) throw new InvalidOperationException("Authorize user first!"); @@ -335,12 +332,12 @@ namespace TLSharp.Core var req = new TLRequestGetHistory() { Peer = peer, - OffsetId = offset_id, - OffsetDate = offset_date, - AddOffset = add_offset, + OffsetId = offsetId, + OffsetDate = offsetDate, + AddOffset = addOffset, Limit = limit, - MaxId = max_id, - MinId = min_id + MaxId = maxId, + MinId = minId }; return await SendRequestAsync(req); }