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

chatInviteLinkInfo.type.supergroup_id = 0 #2600

Closed wowka1319 closed 11 months ago

wowka1319 commented 1 year ago

I know checkChatInviteLink can return chatInviteLinkInfo with chat_id=0. But I also observe checkChatInviteLink.type as chatTypeSupergroup with supergroup_id=0. I cannot find this in docs for chatTypeSupergroup. Is this error?

levlam commented 1 year ago

The behavior is the same as for the chat_id field, i.e. the identifier isn't known if the user has no access to the chat before joining. I will explicitly mention this in the documentation.

wowka1319 commented 1 year ago
  1. Is 0 invalid id for every type (supergroup, basic_group, user, message_id, ...)? If true it would be good to see that in docs.
  2. Is there way to detect when two invite links point to the same supergroup without joining? I mean the links that work via request only.
  3. Can the invite link point to another supergroup after a while like usernames?
levlam commented 1 year ago
  1. Yes, but you can't receive 0 as the identifier usually, and if you can, then this is documented and documented, what exactly it means for the field.
  2. No.
  3. No.