tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Delays in getting message updates from some specific channels #2853

Closed Tidalikk closed 5 months ago

Tidalikk commented 6 months ago

I'm using the lib with python, using the example that was provided, so that's the code i'm using with no changes.

But some messages from specific channels are getting delays of 2 or more minutes while others channels are almost instant.

Is this working as intended or is it a bug? Is there a workaround to get more constant message updates?

levlam commented 6 months ago

Messages in channels aren't intended to be delivered in real-time, so this works as intended.

Tidalikk commented 6 months ago

Is there a workaround for this?

Correct me if I'm wrong but doesn't for example the mobile app use this API? And the app always gets the channel updates in real time.

So wouldn't it be possible to replicate this?

levlam commented 6 months ago

None of the app get channel updates in real time.

Tidalikk commented 6 months ago

None of the app get channel updates in real time.

The delay im talking about never happens on the telegram app. Even on this channels it's always instant, the date on the notification of the phone matches the date that the message was published to the channel.

While using the example code provided I'm getting significant delays which are not present on the app.

So there must be a difference.

Do you know why this difference happens? And is there no workaround to have the same performance as the phone app?

The explanation could even be that the telegram devs want this high performance of instant messages from channels to only happen on official apps.

I just want to understand what's going on

levlam commented 6 months ago

Messages can't be delivered simultaneously to all users, so there can be some difference, but there are no workarounds. Messages will be delivered when appropriate.