harshil21 · GitHub

Can we rule out that both are non-None at the same time?

Yeah, only one of .forward_from or .forward_from_chat is None for a forwarded message, except when the account is hidden by the user (privacy setting), then both those attributes are None. So the filter would fail in that case. We should mention that too in the docs.

maybe it's just cleaner to provide both Filters.forward_{from, from_chat}.

They do have the same function, so as a user I would not like the hassle of switching between the two.

In any case, the docstring should explicitly mention, which attribute of the message is checked.

Agreed.

Read the original on github.com ↗