Closed Bibo-Joshi closed 3 months ago
Documentation was fixed and the missing fields were added to documentation.
It makes no sense to prohibit creation of subscription links for public chats. The chat can be converted to public or private any time after link creation anyway. The chat can also be private but publicly accessible via linked public supergroup for comments.
Thanks for the quick reaction:)
Hi there,
while implementing the API 7.9 changes in the
python-telegram-bot
library, I noticed two oddities on the behavior ofcreate_chat_subscription_link
.First, the documented return value is
ChatInviteLink
. My observed behavior is that the returned object includes the fieldssubscription_period
andsubscription_price
in addition to the fields documented for that class. If this intended behavior that users are supposed to rely on, I would welcome it if these attributes where added to the documentation.Secondly, I noticed that in the app you can't create subscription invite links for public channels. However,
create_chat_subscription_link
can still be called and the return value does include the fields mentioned above. Still, clicking on the link will make you join the channel without having to pay anything. Personally, I would have expectedcreate_chat_subscription_link
to raise, e.g., aBadRequest: Cannot create subscription for public channels
. I guess that this might more on the TG server side than the bot api side, but I still wanted to point it out.Cheers!