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

updateSupergroup[FullInfo] after updateNewChat only? #2332

Closed wowka1319 closed 1 year ago

wowka1319 commented 1 year ago

updateSupergroup[FullInfo] is guaranteed to come only after the coresponding updateNewChat? In other words, when receiving updateSupergroup[FullInfo] can I be confident that I received updateNewChat before?

AYMENJD commented 1 year ago

In other words, when receiving updateSupergroup[FullInfo] can I be confident that I received updateNewChat before?

Yes, updateNewChat is always the first update about the chat.

wowka1319 commented 1 year ago

However I receive updateSupergroup first and then updateNewChat. The delay is less 0.001 sec, but that ordering is stable.

levlam commented 1 year ago

updateSupergroupFullInfo is an update about a supergroup, so it comes after updateSupergroup. But it is completely independent from updateNewChat.

wowka1319 commented 1 year ago

How to get chat_id from Supergroup? Adding prefix -100 doesn't seem to be a durable way (didn't see that guarantee in docs).

levlam commented 1 year ago

@wowka1319 You need to use the method createSupergroupChat for this.