-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
What kind of feature are you missing? Where do you notice a shortcoming of PTB?
Message.link currently does not reflect if a message is a comment on another message in a supergroup/channel and also does not reflect if it's a message in a forum topic. By now we have a official documentation on how message links work: https://core.telegram.org/api/links#message-links and it would be nice to extend the support for this.
Describe the solution you'd like
I'd like for Message.link to reflect the "threads" that the message was sent in. IISC that can achieved by
- include the
reply_to_message_idasthreadparameter in groups - include the
reply_to_message_idascommentparameter in channels - for topics, I'm no entirely sure, but IISC the forum id and message_id should suffice, maybe the
forum_idcan also be used asthread
Admittedly, this needs some double checking on how things works out.
Describe alternatives you've considered
We could also add a full-fledged build_message_link function to helpers (or sim naming) that accepts all parameters described in https://core.telegram.org/api/links#message-links and use that function in Message.link.
We could also provide a method Message.build_link that accepts boolean flags that indicate if the link should represent the message in the thread (if available) or in the whole chat etc, but I think that's over the top.
Additional context
Originated from https://t.me/pythontelegrambotgroup/648879.
This has no priority to me. Just nice to have.