Andres G. Aragoneses
3762664c14
Normalize line endings
2018-03-04 00:39:23 +08:00
Andres G. Aragoneses
bf568d80cc
TelegramClient: change Connect() to return void instead of always true
...
If a method that returns bool is never returning false,
it's essentially not giving any information at all, which
means that it should return void. This will help the
consumers of this API to stop thinking that the result
of this function means if the connection was succesful
(which it is, actually, but it was never returning false
because if there's any problem connecting, the result would
be an exception instead).
2018-03-01 23:41:35 +08:00
Andres G. Aragoneses
4ce0f72d6d
TelegramClient: move the _sender null check to RequestWithDcMigration()
...
The method IsPhoneRegisteredAsync() was calling
RequestWithDcMigration() which was the real method
that made use of the _sender field, so we can move
the null check to there.
This will also help track down possible NullReferenceExceptions
that could happen when other callers of this method
arrive with a bad _sender, which might aid us trying
to fix #706 .
2018-02-28 08:43:28 +08:00
Robert Massa
0940d3d982
Prepare requests for re-sending after a DC migration
...
Fixes #608 .
2017-11-21 21:02:51 +08:00
Afshin Arani
d15d87833e
Remove Old FileMigrationException Handler
...
this catch block could never be reached anymore because of changes
proposed in #622
2017-11-16 14:04:24 +03:30
Afshin Arani
1877c9061c
Handle Import & Export Authorization While Reconnecting
...
closes #624
2017-11-16 14:03:31 +03:30
Afshin Arani
659becfd51
Make TLVector implement IList
2017-11-09 20:10:22 +08:00
Afshin Arani
d769dd3c2f
Generator Must Respect MS .NET API guidelines
2017-11-09 19:37:09 +08:00
Robert Massa
3ba3ea53fd
Handle DataCenterMigration exceptions in all methods exposed by TelegramClient
...
This handles the data center migration in more cases.
Fixes bugs like mentioned in #599 .
2017-11-08 09:54:05 +08:00
Daniel Vygolov
0015cf494b
Added new type of DataCenterMigrateException - NetworkMigrateException
...
Now we catch not only PhoneMigrateException but all DataCenterMigrationExceptions and reconnect
Fixes #568
2017-09-29 01:09:48 +08:00
Afshin Arani
133b9fdf6c
TL-Layer: Update To Layer 66 ( #519 )
...
* TL-Layer: Update To Layer 66
2017-07-20 10:07:24 +08:00
AmiNadim
0d55940c12
Added while loop to MakeAuthAsync method. ( #477 )
...
fix PhoneMigrationException by reconnecting to DC on the error .
(fix for #458 )
2017-05-18 21:06:33 +08:00
salarcode
c5187ae12b
Implementing IsConnected
...
Closes #460
2017-04-26 13:18:17 +08:00
Barsham Sotoudeh
26aa35b88a
Add missing "offset" parameter in catch block of the GetFile method ( #402 )
...
This offset optional parameter was added in a753a1ab13
2017-02-17 23:16:55 +08:00
Starli0n
48077961ae
Custom TCP hanlder to allow HTTP proxy auth
2017-01-27 10:58:47 +01:00
Starli0n
a753a1ab13
Add offset parameter to GetFile() method
2017-01-19 19:31:27 +01:00
Starli0n
5e6cf48490
Add GetHistoryAsync() to TelegramClient
2017-01-09 18:25:55 +01:00
Mikhail
47d1c10c9d
Search user by username with send message test. ( #356 )
...
* Search user by username with send message test.
2016-12-28 22:37:34 +08:00
Andres G. Aragoneses
6d73c0e964
Merge pull request #344 from salarcode/master
...
Implement IDisposable in TelegramClient class
2016-12-16 15:00:46 +08:00
salar2k
fc09dba71b
Implementing IDisposable
2016-12-16 10:25:33 +03:30
unn4m3d
545e736808
Catch PhoneMigrationException in IsPhoneRegisteredAsync
2016-11-27 19:37:15 +10:00
Afshin Arani
6f9c328349
Add Cloud Password Support
2016-11-16 17:01:00 +03:30
Eugene Timokhov
8b2f227142
Added possibility to do ping request (SendPingAsync method)
2016-11-07 02:40:19 +03:00
Ilya Pirozhenko
24a9ea1ed9
Merge pull request #277 from knocte/friendlerAuthTestFailures
...
Friendlier exceptions for Auth testing
2016-10-31 11:12:36 +03:00
Andres G. Aragoneses
f062c0a7a1
Friendlier exceptions for Auth testing
...
This change also lets you write the auth code in the
app.config file without the need to recompile/debug.
2016-10-31 00:17:03 +08:00
Andres G. Aragoneses
34e89f3f37
Require some parameters as non empty & not null before proceeding
2016-10-30 23:34:44 +08:00
Andres G. Aragoneses
a029c33e34
TelegramClient ctor: move null checks earlier
...
This way we avoid creating a FileSessionStore object
or initializing the TLContext if API credentials are
not supplied, to be on the safe side.
2016-10-30 23:34:33 +08:00
Andres G. Aragoneses
c1305ada65
Rename MigrationNeededException to PhoneMigrationException
...
There are different kind of MIGRATE errors that could be
thrown by the Telegram API, as evidenced by this recent
change:
b06f8a8e11
So this rename tries to make it consistent to the new
exception names:
* FILE_MIGRATE_x -> FileMigrationException
* USER_MIGRATE_y -> UserMigrationException
* PHONE_MIGRATE_z -> PhoneMigrationException
2016-10-30 15:57:45 +08:00
Ilya P
b06f8a8e11
Added File-Migrate feature
2016-10-29 11:47:18 +03:00
Afshin Arani
8c2cab48f4
Change TLDialogs to TLAbsDialogs
2016-10-26 20:13:19 +03:30
Andres G. Aragoneses
0e32291d11
Tests: show a more meaningful exception when running for 1st time
...
Instead of throwing a System.FormatException, capture the URL
thrown by the library itself so that the developer configures
the API_ID and API_HASH and places them in the app.config file.
2016-10-23 23:23:10 +08:00
Ilya P
f6ad50ce94
- added getFile method
2016-10-23 13:29:18 +03:00
Ilya P
1d6035aeb7
- fix file Uploader
...
- refactor file uploader
- added test for file uploading
2016-10-23 13:02:44 +03:00
Andres G. Aragoneses
77867b44e6
Use better exception handling
...
Parsing the message of an exception to decide what to do
next is a bad practice, because it's easy that the message
might be changed by mistake in the future. To enforce the
coupling in a stronger way it's better to use exceptions
of different type depending on the kind of error, so that
we rely on the compiler enforcing the behaviour when doing
changes in this error handling areas in the future.
This also makes the code a bit more simple and readable.
2016-10-22 22:00:15 +08:00
Ilya P
40c1725e41
- Layer 53
...
- Fix bug in generator
- Fix DC switching
- change default server
2016-10-15 13:35:54 +03:00
Ilya P
066e9cacfe
- Updated README
2016-10-11 17:31:30 +03:00
Ilya P
0351c0f1df
Add AsyncSuffix to methods
2016-10-11 16:32:38 +03:00
Ilya P
2ffa954246
Fixes
2016-10-11 16:28:57 +03:00
Afshin Arani
6af7c66a81
Redesign Everything
2016-09-24 17:08:26 +03:30
Afshin Arani
1c2e354967
Update Everything
2016-09-22 17:01:59 +03:30
steavy29
78e3a7794f
Merge fix.
2016-09-14 14:57:07 +03:00
Ilya Pirozhenko
8411235fe1
Merge branch 'pr/203'
...
Conflicts:
README.md
TLSharp.Core/TelegramClient.cs
TLSharp.Tests/TLSharpTests.cs
2016-09-13 22:24:00 +03:00
Ilya Pirozhenko
148828edc1
Merge branch 'pr/198'
...
Conflicts:
TLSharp.Tests/TLSharpTests.cs
2016-09-13 22:17:31 +03:00
steavy29
1c31794751
Added GetUpdatesDifference and GetUpdatesState functions implementations.
2016-09-13 13:34:32 +03:00
steavy29
ccf2008404
Added implementation of AddChatUser/DeleteChatUser/LeaveChat
2016-09-09 19:56:47 +03:00
steavy29
98f014a49d
Implemented CreateChat. Fixed MessageServiceConstructor - migrated it from api layer level 16 to 23.
2016-09-08 14:35:25 +03:00
steavy29
c48109eee3
Added SignUp implementation.
2016-09-06 18:37:05 +03:00
David Woakes
089f80fcce
Add contacts.GetContacts method to client
2016-07-21 06:57:15 +01:00
David Woakes
15a51818f9
Fix spelling of Receive
2016-07-20 08:09:27 +01:00
David Woakes
7c8d5e089e
Make line endings consistent (LF)
2016-07-20 07:26:55 +01:00