Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter creates_join_request has no Effect for Public Groups #429

Closed
Bibo-Joshi opened this issue Jun 29, 2023 · 4 comments
Closed

Parameter creates_join_request has no Effect for Public Groups #429

Bibo-Joshi opened this issue Jun 29, 2023 · 4 comments

Comments

@Bibo-Joshi
Copy link

Hi. In the context of #428 I observed that the parameter creates_join_request of createChatInviteLink has no effect for public group. More precisely

  • When join requests are enabled, links created with creates_join_requests=False still require approval.
  • When join requests are disabled, links created with creates_join_requests=True still do not require approval

While one can surely argue about whether these use cases make sense (IMO the first one does, the second not really), it surprised me that the Bot API happily creates the invite links and reports the creates_join_request attribute of ChatInviteLink as requested while it does not have any effect. I would have expected the method to either raise an exception or at least for the creates_join_request setting to reflect the actual setting`.

@levlam
Copy link
Contributor

levlam commented Jun 29, 2023

No, the parameter works as expected. It is considered if the user joins the chat via the invite link, but for public groups users are free to join them directly, even they opened the group via the invite link.

@Bibo-Joshi
Copy link
Author

Thanks for the quick reply. Your answer makes sense for the second use case: If the public group as join requests disabled, creating a link that requires approval makes little sense as the user can just join directly. In the first use case, I disagree. If the group public has join requests enabled, an admin might want to handle out direct invitations via a special invite link that does not require their manual approval. This is currently not possible.
Independent of whether you agree to the use cases, I see a discrepancy in the return value reported by the Bot API and the actual behavior, i.e. the returned field creates_join_request doesn't reflect the actual behavior. This is a problem IMO.

@levlam
Copy link
Contributor

levlam commented Jun 30, 2023

This is currently not possible.

This isn't true. The group setting affects only direct joins and each link has separate setting for request creation. If the user joins the group via invite link, then link's settings will be used. But as I told, some apps may try to join public groups always directly.

@Bibo-Joshi
Copy link
Author

So it's client behavior again. TBH this still seems like a design problem to me, i.e. functionality is provided that is not even meant to be supported by clients in all cases. Clients not supporting all of the latest media updates & unofficial clients having odd behavior in some cases is one thing, but here we are speaking about official clients effectively ignoring the official Bot API.
At the very least I would welcome it if something like "for public groups, clients will usually ignore this parameter and prompt the user the default join-process" would be added to the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants