wiz0u / WTelegramClient

Telegram Client API (MTProto) library written 100% in C# and .NET
https://wiz0u.github.io/WTelegramClient/
MIT License
956 stars 156 forks source link

The method address is different #244

Closed Sidy-xiao closed 5 months ago

Sidy-xiao commented 5 months ago

For example: TLRPC$TL_channels_inviteToChannel TLRPC$TL_messages_addChatUser There are many other methods are inconsistent, please tell me the pc version and the android version of the difference?

Sidy-xiao commented 5 months ago

this is android app address: TLRPC$TL_messages_addChatUser -230206493_F24753E3 TLRPC$TL_channels_inviteToChannel 429865580_199F3A6C this is project address: [TLDef(0xCBC6D107)] public sealed partial class Messages_AddChatUser : IMethod [TLDef(0xC9E33D54)] public sealed partial class Channels_InviteToChannel : IMethod telegram api interface should be multi-platform interworking, why many methods of the address is not the same

wiz0u commented 5 months ago

I think I finally understand what you're saying... What you call the "method address" is the constructor ID.

My library uses the very latest version layer of Telegram Client API which was published a few days ago, most other are still using an older version. Of course, using the latest layer offers more features, and some API may have changed arguments/return type.

In general, you shouldn't have to worry about that constructor ID, and most of the time, your existing C# code would work fine even after upgrading the library version (and being pure .NET library the code is multiplatform, so not sure why you worry about their Java android client)

Also just a reminder: We are independent of Telegram teams, and independent from other libraries providing access to Telegram APIs. So if you have an issue with them or with how Telegram design their API, you should contact them.

Sidy-xiao commented 5 months ago

Concerns will arise: WTelegram.WTException: Cannot find type for ctor #94f592db at This type of exception error. the constructor ID of the previous version of the api was mostly consistent with the android client, but the current version has many inconsistencies. My English is not good. I'm sorry for the trouble caused by the translation software I used。