telegram-bot-api icon indicating copy to clipboard operation
telegram-bot-api copied to clipboard

`ChatMemberUpdated.invite_link` missing when rejoining a public channel using invite link after leaving.

Open hethon opened this issue 1 year ago • 0 comments

I am working on a project that involves counting the number of users who joined my channel using a specific invite link. On my first attempt to join the channel using an invite link, I was able to retrieve the invite link from ChatMemberUpdated.invite_link. However, after making some changes and needing to retest, I left the group with the account used during the first attempt and rejoined using the same invite link. Unfortunately, this time I could not find the invite link in ChatMemberUpdated.invite_link.

It appears that ChatMemberUpdated.invite_link is missing if the user was previously a member of the channel. I tested this theory with several other accounts and found the same result consistently. If an account is completely new to a channel, invite_link is present. However, if the account leaves the channel and rejoins using the same invite link, the link is not found in ChatMemberUpdated.invite_link.

This issue may also exist for groups, but I have not tested it.

P.S — Works fine if either the user is completely new to the channel or the channel is private.

Note: This does not appear to be a client issue, as the behavior was consistent across different accounts and scenarios.

hethon avatar Oct 12 '24 08:10 hethon