Commit graph

416 commits

Author SHA1 Message Date
Wizou 42348166f0 reorder csproj properties 2021-11-04 03:28:01 +01:00
Wizou 4418f562cb Log precise version of lib 2021-11-04 03:10:03 +01:00
Wizou ec6fb6c0c0 Try to use .NET 6.0 RC2 SDK and embed README.md in nuget package 2021-11-04 02:41:04 +01:00
Wizou 248b7d7f5a renamed TL.Helpers.cs to match namespace 2021-11-04 02:21:12 +01:00
Wizou 3bd1f1bb22 Moved "Possible error codes" to <summary> as they are not displayed correctly with <exception> under VS 2019 2021-11-04 02:09:20 +01:00
Wizou e7637011e1 xmldoc for RpcException possible errors and missing type descriptions 2021-11-03 18:20:54 +01:00
Wizou a197573258 Complete XML documentation of the Telegram API ! 2021-11-03 03:53:48 +01:00
Wizou 3ad36f3e56 Fix BadMsgNotification 17 for PC with not precise system clock
Add logging examples
2021-11-02 01:47:14 +01:00
Wizou 2c99e21234 add some debug logging 2021-11-01 15:44:40 +01:00
Wizou 3d561ff63e added Markdown.Escape
improved MarkdownToEntities a bit
2021-10-31 18:28:25 +01:00
Wizou 7616625ac3 Upgrade to layer 134 2021-10-31 03:55:03 +01:00
Wizou 8d8465fa64 precision on tg://user?id= 2021-10-31 02:56:51 +01:00
Wizou e615f83db6 added MarkdownToEntities 2021-10-31 02:40:10 +01:00
Wizou df2fe83ad2 small improvements to Login methods 2021-10-28 22:48:43 +02:00
Wizou 36e7d4ddbc Reenable incoming Updates after an exception in Reactor 2021-10-28 12:31:34 +02:00
Wizou 668138fd78 various markdown updates 2021-10-28 04:59:41 +02:00
Wizou 984c241a09 Support for proxy 2021-10-25 02:40:15 +02:00
Wizou 391c7f96f0 auto-generate properties helpers for fields shared among derived classes 2021-10-23 03:36:46 +02:00
Wizou c9ccaf2d17 More helpers (reordered), notably UserOrChat 2021-10-23 01:37:50 +02:00
Wizou 08ba766e5c Helpers for Contacts_ResolvedPeer. Fix some examples 2021-10-22 19:33:17 +02:00
Wizou af79bfa873 IPeerInfo, IsActive and Dialogs helpers 2021-10-22 15:26:46 +02:00
Wizou 718e96a763 chats and users fields are now serialized as Dictionary for easier access 2021-10-20 19:12:50 +02:00
Wizou 5e2ddf41f6 A null config value for "password" will also show a console prompt 2021-10-20 13:08:10 +02:00
Wizou a473475e11 Removed unused _sem in Session 2021-10-20 00:24:50 +02:00
Wizou f5b108dc9b Fix compatibility issues with .NET Fw 4.7 2021-10-17 23:35:14 +02:00
Wizou 4b1ae1c5e0 Decode max timestamp (= forever) as DateTime.MaxValue 2021-10-17 03:18:36 +02:00
Wizou 80edb184bc Removed DisplayName in favor of ToString() for User classes 2021-10-17 03:16:51 +02:00
Wizou 480697d329 Fix wrong type for MessageBase.ID 2021-10-16 02:01:49 +02:00
Wizou c5c8b49331 Simplify library usage even more 2021-10-15 04:24:34 +02:00
Wizou 98a95376f3 Improved examples documentation 2021-10-13 00:27:40 +02:00
Wizou 37ce6524e9 updated ci version 2021-10-12 02:07:54 +02:00
Wizou f296e6b36d Added Examples/Program_GetAllChats 2021-10-11 18:29:24 +02:00
Wizou 609e8a6a2d Added Examples\Program_CollectAccessHash 2021-10-11 16:11:37 +02:00
Wizou 4f9fbfc12c A null config value for "verification_code" will show a console prompt. This allows Environment.GetEnvironmentVariable to be used directly as config callback. 2021-10-11 14:44:49 +02:00
Wizou 87a85bec4b added Examples\Program_DownloadSavedMedia.cs 2021-10-06 08:21:42 +02:00
Wizou d96902a614 Parallelize upload/download of file parts 2021-10-06 07:54:20 +02:00
Wizou 2520a57f20 ToString for SendMessageAction 2021-10-06 02:41:54 +02:00
Wizou b01eed2042 DC disconnect bug fix 2021-10-01 02:44:56 +02:00
Wizou e7c5d2eb27 Better IPv6 support/fallback. Support RpcError in response to an API returning an array 2021-10-01 02:22:26 +02:00
Wizou d7b4afb1ee More nullable ctors (*NotModified) 2021-09-30 04:00:38 +02:00
Wizou d4c373d95f Nullable ctor: Empty classes are now converted into/from a null value. This simplifies the hierarchy 2021-09-30 03:40:08 +02:00
Wizou 52fb2a7831 Fix SHA corruption due to concurrent use of static instance 2021-09-29 04:38:39 +02:00
Wizou 8610f7e809 Handle AUTH_RESTART & PHONE_CODE_INVALID during login 2021-09-29 02:51:48 +02:00
Wizou da5098e8d5 MULTIPLE-CONNECTION! First version that implement parallel active connections to DCs (through Client instances dependent of the main Client instance)
Also improved on:
- reconnection/retry/resent strategy
- start of multiple parallel downloads triggering a new DC connection
2021-09-28 16:12:20 +02:00
Wizou 66757ccd0b fix MT issue in session.Save 2021-09-27 17:08:22 +02:00
Wizou cb35ec3799 tcs use RunContinuationsAsynchronously (much better) 2021-09-27 17:07:56 +02:00
Wizou 78a0a47c50 Fix serialization issue with null string. DownloadFileAsync for documents now returns the MIME type (more accurate) 2021-09-27 03:25:28 +02:00
Wizou 6770f66270 Fix issue with session file corruption 2021-09-27 03:20:58 +02:00
Wizou 2ff0de667d More class inheritance 2021-09-27 00:39:30 +02:00
Wizou e3b70fda19 BREAKING CHANGE: Introducing inheritAfter which allows for better/simplified (but possibly changed) class hierarchy generation.
Also improved layers class generation.
2021-09-26 05:07:17 +02:00
Wizou e6c5d94d9d Generator: Clean code for generation of abstract classes 2021-09-26 01:19:32 +02:00
Wizou c789308d1e Avoid unnecessary Auth_ExportAuthorization. More reliable DownloadFileAsync 2021-09-25 19:43:39 +02:00
Wizou ca1c1ce8de TL Helpers for MessageBase + Example of use of Messages_GetDialogs 2021-09-25 02:13:06 +02:00
Wizou 0e88280d90 Monitor excessive salt changes in a better way 2021-09-24 13:21:35 +02:00
Wizou c570f3d8d0 support TL bare vectors 2021-09-24 12:29:04 +02:00
Wizou be4d1aca6b added DownloadFileAsync helpers 2021-09-23 13:13:36 +02:00
Wizou 0b3180917f minor improvements 2021-09-23 09:42:35 +02:00
Wizou f1ebafcf09 TL Photo helpers 2021-09-23 09:29:19 +02:00
Wizou 35786ef02a Support multi-DC sessions 2021-09-23 09:27:52 +02:00
Wizou fe7bc6f61c Optimized reactor frame handling 2021-09-23 05:37:00 +02:00
Wizou 223d8984cf Serialize User to Json inside session file to prevent future breaking changes 2021-09-18 07:26:06 +02:00
Wizou f6cc00068a Fix "Invalid frame_len" when downloading files 2021-09-18 02:40:58 +02:00
Wizou 3918362743 Fix "Non-negative number" issue with large bytes fields 2021-09-18 02:30:12 +02:00
Wizou e0556af742 Convert empty type hierarchies to enums 2021-09-18 02:11:23 +02:00
Wizou 701795efe9 Start keep-alive pings only after authorization key 2021-09-17 15:13:38 +02:00
Wizou f66872cb32 Fix unencrypted message sending issue after switch to Intermediate protocol 2021-09-17 15:09:12 +02:00
Wizou 37974c70b7 Convert TL functions to extension methods 2021-09-17 04:53:02 +02:00
Wizou c727f75380 Upgrade to layer 133 (lots of changes, all IDs are now long). You'll need to delete your WTelegram.session files 2021-09-17 03:58:52 +02:00
Wizou 661b5223ac Switch to MTProto Intermediate transport protocol (more lightweight/adequate for TCP) 2021-09-17 03:44:52 +02:00
Wizou a403a462db fetch Updates_GetState on session resuming to subscribe to new updates 2021-09-17 03:25:27 +02:00
Wizou 184a133dce Add Keep-Alive system (will also send pending acks) 2021-09-17 03:12:23 +02:00
Wizou b17349bd75 Added auto-reconnect system, hoping it will help with connection shutdown issues
README: added Troubleshooting guide
2021-09-16 04:47:15 +02:00
Wizou dcd384ed27 Update callback is now void (or async void)
Added ListenUpdates example
2021-09-05 01:08:16 +02:00
Wizou 3b8ec9d910 Constructor's updateHandler parameter is now an Update event 2021-09-03 00:06:48 +02:00
Wizou c5e9e228a7 Updated README about 2nd run prompts.
Validation of logged-in user can be skipped with user_id = -1
(use it cautiously, if you're sure you're not changing user between sessions)
2021-09-02 00:39:06 +02:00
Wizou 832e2143f5 Fix issue with SHA computation under .NET Framework 2021-09-02 00:00:54 +02:00
Wizou cd6d813845 Prevent logging reactor exceptions if expected due to cancellation 2021-09-01 23:11:18 +02:00
Wizou 67285c1c08 Remember the good primes to prevent verifying them twice 2021-09-01 23:03:04 +02:00
Wizou 3701ba6f72 Fix warning: The predefined type "RuntimeHelpers" is defined in multiple assemblies 2021-08-30 16:13:52 +02:00
Wizou 4174b21a83 Experimental collection of id/access_hash pairs 2021-08-30 01:31:08 +02:00
Wizou 0d5546bee5 Improve nuget properties 2021-08-29 23:15:34 +02:00
Wizou ce41af2f84 Validation of logged-in user can also be done by its user_id 2021-08-27 22:44:43 +02:00
Wizou ef93dda3ac Validate preexisting logged-in user. Force reauthorization after AUTH_RESTART 2021-08-27 14:14:24 +02:00
Wizou ccb48e3b3d Logon => Login 2021-08-26 17:46:45 +02:00
Wizou faf24bfb2a UserAuthIfNeeded => LogonUserIfNeeded (+ more robust) 2021-08-25 15:32:25 +02:00
Wizou d4cb4f59d5 Moved UpdateCrc32 to Compat
Added some xml comment
2021-08-25 12:53:36 +02:00
Wizou 166a35f732 added BotAuthIfNeeded 2021-08-24 17:24:46 +02:00
Wizou 53ee143a1d Removed dependency on Crc32.NET 2021-08-24 10:49:32 +02:00
Wizou 593463f46b Upgrade to layer 131
not available as JSON on official website https://core.telegram.org/schema
but found as TL files at https://github.com/telegramdesktop/tdesktop/tree/dev/Telegram/Resources/tl
2021-08-20 14:45:39 +02:00
Wizou 524cb71a65 FLOOD_WAIT_X throw exception if wait is more than 60 seconds 2021-08-20 03:41:00 +02:00
Wizou 2930bd2f9c Added .github folder 2021-08-20 03:20:20 +02:00
Wizou d61234cabc Make MillerRabinIterations configurable for slow devices 2021-08-20 02:33:43 +02:00
Wizou f2a1dbc20d Implement Telegram protocol safety checks 2021-08-20 02:13:58 +02:00
Wizou e205244cf7 Implement RSA_PAD algo for new public keys 2021-08-19 09:28:56 +02:00
Wizou 8aa07011e9 JSON serialization through JSONValue.ToString() 2021-08-19 06:56:55 +02:00
Wizou 6f77e828db Added new package logo from @MrVeil303 (resized 128x128 as recommended by Nuget) 2021-08-18 00:12:33 +02:00
Wizou 2a3c64d3d6 fix build 2021-08-16 22:52:33 +02:00
Wizou 866c562d81 Add compatibility with .NET Standard 2.0 (multi-target) 2021-08-16 22:30:45 +02:00
Wizou 2bced387a1 Add helper for Peer ID 2021-08-16 05:56:39 +02:00
Wizou cc83944985 Better handle bare requests. Handle more service messages. 2021-08-14 15:15:41 +02:00
Wizou 39f03ed78f Support for FLOOD_WAIT_X 2021-08-14 08:55:30 +02:00
Wizou 70f9a61e17 updated readme badges 2021-08-13 17:32:07 +02:00
Wizou e01caba162 Fix issue with actual RpcResult in MsgContainer ; Parallelize upload of file parts 2021-08-13 07:06:44 +02:00
Wizou 897b61747a Reactor system for parallelization of requests 2021-08-13 00:28:34 +02:00
Wizou 5e6421d76e simplify ITLFunction<X> into ITLFunction 2021-08-12 12:37:56 +02:00
Wizou 83c0991770 XML comments: add URLs to API pages 2021-08-12 11:01:15 +02:00
Wizou 21caecd164 MTProto 2.0 2021-08-10 14:40:41 +02:00
Wizou ba90b47831 Added 2FA support 2021-08-10 08:25:37 +02:00
Wizou 3d540cdb8f Make TL classes partial so we can extend them with helpers in Helpers.TL.cs 2021-08-10 03:12:33 +02:00
Wizou 674130e079 TL Functions are now direct Client methods ; Renamed/rationalized serialization methods 2021-08-09 11:41:50 +02:00
[-_-Mr_Veil-_-] 00211e5b5c Migrate to .NET Standard 2.0 2021-08-08 17:35:05 +03:00
Wizou 8ae3c2a283 ReadMe 2021-08-08 14:58:49 +02:00
Wizou d9efe4fae0 Add MIT license 2021-08-08 11:09:44 +02:00
Wizou aec4dc0f97 Set nuget package metadata 2021-08-07 15:34:42 +02:00
Wizou 95870c485d updated README 2021-08-07 07:58:08 +02:00
Wizou 4dd03c66a6 Move code to src folder 2021-08-07 06:25:51 +02:00