diff --git a/TLSharp.Core/TelegramClient.cs b/TLSharp.Core/TelegramClient.cs index 97f4ac8..a6d2f51 100644 --- a/TLSharp.Core/TelegramClient.cs +++ b/TLSharp.Core/TelegramClient.cs @@ -23,7 +23,7 @@ namespace TLSharp.Core private Session _session; private List dcOptions; - public TelegramClient(ISessionStore store, string sessionUserId, string apiHash, int apiId) + public TelegramClient(ISessionStore store, string sessionUserId, int apiId, string apiHash) { _apiHash = apiHash; _apiId = apiId; diff --git a/TLSharp.Tests/TLSharpTests.cs b/TLSharp.Tests/TLSharpTests.cs index e0d1764..fe09cb9 100644 --- a/TLSharp.Tests/TLSharpTests.cs +++ b/TLSharp.Tests/TLSharpTests.cs @@ -45,7 +45,7 @@ namespace TLSharp.Tests public async Task AuthUser() { var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiHash, apiId); + var client = new TelegramClient(store, "session", apiId, apiHash); await client.Connect(); @@ -61,7 +61,7 @@ namespace TLSharp.Tests public async Task CheckPhones() { var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiHash, apiId); + var client = new TelegramClient(store, "session", apiId, apiHash); await client.Connect(); var result = await client.IsPhoneRegistered(NumberToAuthenticate); @@ -74,7 +74,7 @@ namespace TLSharp.Tests // User should be already authenticated! var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiHash, apiId); + var client = new TelegramClient(store, "session", apiId, apiHash); await client.Connect(); @@ -89,7 +89,7 @@ namespace TLSharp.Tests public async Task ImportByUserName() { var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiHash, apiId); + var client = new TelegramClient(store, "session", apiId, apiHash); await client.Connect(); @@ -104,7 +104,7 @@ namespace TLSharp.Tests public async Task ImportByUserNameAndSendMessage() { var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiHash, apiId); + var client = new TelegramClient(store, "session", apiId, apiHash); await client.Connect(); @@ -123,7 +123,7 @@ namespace TLSharp.Tests // User should be already authenticated! var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiHash, apiId); + var client = new TelegramClient(store, "session", apiId, apiHash); await client.Connect(); Assert.IsTrue(client.IsUserAuthorized()); @@ -139,7 +139,7 @@ namespace TLSharp.Tests public async Task GetHistory() { var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiHash, apiId); + var client = new TelegramClient(store, "session", apiId, apiHash); await client.Connect(); Assert.IsTrue(client.IsUserAuthorized()); @@ -157,7 +157,7 @@ namespace TLSharp.Tests public async Task UploadAndSendMedia() { var store = new FileSessionStore(); - var client = new TelegramClient(store, "session", apiHash, apiId); + var client = new TelegramClient(store, "session", apiId, apiHash); await client.Connect(); Assert.IsTrue(client.IsUserAuthorized()); @@ -182,7 +182,7 @@ namespace TLSharp.Tests public async Task TestConnection() { var store = new FakeSessionStore(); - var client = new TelegramClient(store, "", apiHash, apiId); + var client = new TelegramClient(store, "", apiId, apiHash); Assert.IsTrue(await client.Connect()); }