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

Working with invitations. #2769

Closed fat-complex closed 9 months ago

fat-complex commented 9 months ago

There are invitations in the telegram. I have an invitation to a group that I don't have. What should I do to receive this chat or what updates should I wait to see this chat (group) in order to process the invitation?

levlam commented 9 months ago

You can't receive the chat most of the time, you can only join it. All links are processed by calling getInternalLinkType -> getExternalLinkInfo -> getExternalLink. These links will have type internalLinkTypeChatInvite and should be processed as documented.

fat-complex commented 9 months ago

Thx) Here I have a link and I know that this is the internalLinkTypeChatInvite type. Can I use joinChatByInviteLink? Or do you need any additional actions?

levlam commented 9 months ago

Call checkChatInviteLink with the given invite link to process the link. If the link is valid and the user wants to join the chat, then call joinChatByInviteLink.

fat-complex commented 9 months ago

Wow))) Thx)))

fat-complex commented 9 months ago

I called checkChatInviteLink. Why do I get this error when calling joinChatByInviteLink: [ 1][t 0][1705989755.632174015][DialogInviteLinkManager.cpp:84][!Td] Receive wrong result for ImportChatInviteQuery: updates ?

When I call this method a second time, there is no such message.

levlam commented 9 months ago

Could you enable TDLib log with verbosity level 4 and send it as a file to https://t.me/tdlib_bot?

fat-complex commented 9 months ago

@levlam, sent

levlam commented 9 months ago

The mentioned error should be fixed in the latest TDLib version from Github.

fat-complex commented 9 months ago

I use this version 1.8.23

levlam commented 9 months ago

You need to update to the latest version from master.

fat-complex commented 9 months ago

@levlam Thx)