Skip to content

Improved Message.link - #3640

Merged
Bibo-Joshi merged 12 commits into
python-telegram-bot:masterfrom
Trifase:message-link
Apr 7, 2023
Merged

Improved Message.link#3640
Bibo-Joshi merged 12 commits into
python-telegram-bot:masterfrom
Trifase:message-link

Conversation

@Trifase

@Trifase Trifase commented Mar 30, 2023

Copy link
Copy Markdown
Contributor

When done will close #3475

Checklist for PRs

  • Added .. versionadded:: version, .. versionchanged:: version or .. deprecated:: version to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
  • Created new or adapted existing unit tests

@Trifase

Trifase commented Mar 30, 2023

Copy link
Copy Markdown
Contributor Author

In the end I just added two lines to detect if the message is a topic message, in which case append the thread= parameter to the link.

I think that's all that is needed because it reflects what official clients do.

@Trifase
Trifase marked this pull request as ready for review March 30, 2023 21:59

@Poolitzer Poolitzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks trifase

@Bibo-Joshi Bibo-Joshi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! The changes themself look good - I guess you double checked that this is working on at least the official clients? However I'm missing

  • a versionchanged:: telling the user that the property now also reflects the reply-thingy
  • support for reply_to_message_id in non-topic groups

Could you add those as well?

Comment thread telegram/_message.py Outdated
Trifase and others added 4 commits April 3, 2023 21:36
Comment thread telegram/_message.py
Comment thread telegram/_message.py Outdated
Trifase and others added 2 commits April 5, 2023 21:17
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
@Trifase
Trifase requested a review from Bibo-Joshi April 6, 2023 17:55

@Bibo-Joshi Bibo-Joshi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the Updates! LGTM now :) @Poolitzer do you have any comments left?

@Poolitzer

Copy link
Copy Markdown
Member

nope Im good feel free to merge

@Bibo-Joshi
Bibo-Joshi merged commit 401b2de into python-telegram-bot:master Apr 7, 2023
@Bibo-Joshi

Copy link
Copy Markdown
Member

Thank you for the contribution @Trifase 🥳

@github-actions github-actions Bot locked and limited conversation to collaborators Apr 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Improve Message.link property to reflect threads

4 participants