Closed delykj closed 7 years ago
Hi. Not sure if channels are supported in API 23. Will check today.
Yes, unfortunately channels aren't supported in current API version.
Hi... Mr. @steavy29, I have used like @delykj 's code and got same problem, but in my case i got updates update.constructor after added code like this:
FileSessionStore session = new FileSessionStore();
client = new TelegramClient(session, apiId, apiHash, new DeviceInfo("Telegram Test", "Telegram Test", "1.0", "en"));
client.UpdateMessage += TelegramUpdateHandler;
bool started = (await client.Start());
await client.ResolveUsername(textUserName.Text);
Sory for bad english.
Thanks,
@steavy29, is the official Telegram Client (https://github.com/telegramdesktop/tdesktop) using tricks to get channel updates and don't using the API to get channel updates?
@romi4rd1, I have tried to add your code, but I'm still don't get channel updates. Did you use Constructor.UpdateShortMessage, Constructor.UpdateShortChatMessage for channel updates? What constructor did you use? Do you see the message text that other person sent to the channel? Thanks your help.
@delykj "tdesktop" uses higher API(66 atm) version which supports channel updates and constructors. When Telegram.Net establishes connection with Telegram server it specifies it's API version so I think that server doesn't even try to send channel updates to it since it knows that those aren't supported by client(Telegram.Net).
@steavy29 Is it hard to support API v66 in your code? I suppose it isn't such easy to change 23 to 66 :-)
Working on latest Api support.
Can i recieve channel messages throught message history for example and than mark as read?
Here some code of layer 66. https://github.com/sochix/TLSharp/blob/master/TeleSharp.TL/TL/Updates/TLRequestGetChannelDifference.cs
Hello,
I would like to get channel updates. I have used the sample code you provided in issue #25, but I didn't get any update when a channel get a new post.
and the update handler code: