karin0 · GitHub

@karin0

Copy link Copy Markdown

Contributor

Closes #5236.

Channel posts from channels with "Sign messages" may carry a Message.from_user. We check it in Update.effective_user, so Update.effective_user and Update.effective_sender return the signing user.

Check-list for PRs

  • Added .. versionadded:: NEXT.VERSION, .. versionchanged:: NEXT.VERSION, .. deprecated:: NEXT.VERSION or ``.. versionremoved:: NEXT.VERSION` to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
  • Created new or adapted existing unit tests
  • Documented code changes according to the CSI standard
  • Added myself alphabetically to AUTHORS.rst (optional)
  • Added new classes & modules to the docs and all suitable __all__ s
  • Checked the Stability Policy in case of deprecations or changes to documented behavior

Closed

@harshil21

Copy link Copy Markdown

Member

Hello! Thanks for the catch! Is it possible for you to add a new chango fragment in the changes/unreleased directory? It should be named as 5237.effective-user-fix.toml. See the contents of the other files in that directory on what to put inside that file.

Also you might have some tests failing after this change. See our contributing guide on how to run tests locally.

@karin0

@karin0

Copy link Copy Markdown

Contributor Author

Hello! Thanks for the catch! Is it possible for you to add a new chango fragment in the changes/unreleased directory? It should be named as 5237.effective-user-fix.toml. See the contents of the other files in that directory on what to put inside that file.

Also you might have some tests failing after this change. See our contributing guide on how to run tests locally.

Thanks for the review! I have added changes/unreleased/5237.effective-user-fix.toml.

All the failures I see locally are BadRequest and seem unrelated to the changes. pytest -m no_req tests still pass here.

harshil21

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.

Just one tiny thing. Can you also fix that one failing test?

…ve_user`
Channel posts with signatures can carry a `from_user` field.

@karin0

@karin0

Copy link Copy Markdown

Contributor Author

Just one tiny thing. Can you also fix that one failing test?

Sorry for having missed the test! I have updated the test and it passes locally now.

harshil21

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 for the fix!

@harshil21

@harshil21

@harshil21

Read the original on github.com ↗