solarin
9623f9d5ac
Revert "+ overload for method InviteToChannel"
...
This reverts commit 45be5f51d3 .
2020-04-06 10:45:40 +04:00
solarin
45be5f51d3
+ overload for method InviteToChannel
...
! filter wasn't actually used
! renamed the ParticipantTypes -> ParticipantFilterTypes
2020-04-06 10:22:41 +04:00
solarin
7dedf2a28a
+ InviteToChannel
...
! Added token to the parameters of async methods
! Typos and comments
2020-04-05 17:30:15 +04:00
solarin
3721e8cfee
added methods to get the participants of a group/channel
2020-04-05 15:50:09 +04:00
solarin
65ff8ccbc1
2020-04-05 15:42:48 +04:00
solarin
00fb3ae500
removed the previously added changed not pertinent to this PR
2020-04-03 20:31:44 +04:00
Andres G. Aragoneses
2d4aa3e8f9
style: more consistent naming removing underscores
...
There were less places with underscores in field names than
places without them, so we now are consistent with the most
abundant occurrence.
2020-04-03 20:31:24 +04:00
solarin
54781b235f
+ GetFullChat to get the info of a chat
...
+ GetAllChats to get all available user's chats
+ MakeAuthBotAsync to authenticate a bot instead of a user
2020-04-03 17:57:48 +04:00
solarin
406a73b89c
fixed typos and spaces
2020-04-03 17:55:21 +04:00
solarin
92ca5a9ac1
+ GetFullChat to get the info of a chat
...
+ GetAllChats to get all available user's chats
+ MakeAuthBotAsync to authenticate a bot instead of a user
2020-04-03 17:35:18 +04:00
solarin
e067688a48
tabs-> 4 spaces
...
added the csproj
2020-04-03 17:15:53 +04:00
solarin
80d16fe4a4
Added an IPv4/IPv6 toggle to TelegramClient constructor
2020-04-03 17:05:06 +04:00
Andres G. Aragoneses
90f9305dd6
style: more consistent naming removing underscores
...
There were less places with underscores in field names than
places without them, so we now are consistent with the most
abundant occurrence.
2020-01-31 14:39:19 +08:00
CheshireCaat
c5a2c816fc
Improvements for async methods
...
Added CancellationToken with default value to all async methods in TLSharp.Core
Added ConfigureAwait(false) to all async methods in TLSharp.Core
SendRequestAsync replaced to SendAuthenticatedRequestAsync in methods that need auth
Private modifier in SendAuthenticatedRequestAsync changed to internal
Based on PR created by @IaRuslan
2020-01-28 10:10:49 +03:00
Andres G. Aragoneses
dc8c20df63
Core: avoid some code repetition
2020-01-25 16:16:14 +08:00
CheshireCaat
8729b7d85b
Exceptions moved to separate folders ( #899 )
...
Exceptions from MtProtoSender.cs to TLSharp.Core/Network/Exceptions
Exceptions from TelegramClient.cs to TLSharp.Core/Exceptions
2020-01-25 02:28:37 +08:00
CheshireCaat
0a91487ea7
Add methods for working with usernames. ( #897 )
...
Added methods for working with usernames:
Check username (Validates a username and checks availability)
Update username (Changes username for the current user)
2020-01-23 15:11:24 +08:00
CheshireCaat
c9ac0bab87
Add methods for working with contacts. ( #896 )
...
Added methods for working with contacts:
* Import contact list
* Delete contact list
* Delete one contact
2020-01-23 12:02:19 +08:00
Felony
8a15feea7c
Add Session getter-only property to TelegramClient
...
Add Session readonly field which lets the developer read session
properties like current logged-in user's Username et-al.
https://github.com/sochix/TLSharp/pull/875
2019-10-05 10:23:14 +08:00
Andres G. Aragoneses
60a3c62357
Core: avoid possible infinite loop if switching to same DC
...
People are reporting that under some circumstances, an infinite
loop could happen when TLSharp tries to handle a reconnection to
a different DC, if the DC instructed to be used is the same as
the one that was used in the last connection.
Not sure how could this happen (although the analysis present in
this github issue [1] might help understand it), but this commit
helps to make TLSharp fail fast (with an exception) instead of an
infinite loop from now on, which will help avoiding people file
issues such as [2] and [3] and instead maybe file a proper bug
report easier to understand, to try to fix the underlying root
cause.
[1] https://github.com/sochix/TLSharp/issues/719
[2] https://github.com/sochix/TLSharp/issues/803
[3] https://github.com/sochix/TLSharp/issues/839
2019-02-10 13:53:46 +01:00
Andres G. Aragoneses
d04ddb1e0e
Core: fix 2 warnings
2019-02-10 13:36:37 +01:00
Marc R Kellerman
f2a394ea15
Fixed OffSet paramets for GetUserDialogsAsync & GetHistoryAsync ( #831 )
...
Fixes https://github.com/sochix/TLSharp/issues/696
Fixes https://github.com/sochix/TLSharp/issues/597
2019-01-04 18:16:35 +08:00
vlad_neg
47e973823a
issue#768 fix exception 'Constructor Invalid Or Context.Init Not Called !'
2018-05-30 07:31:03 +08:00
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