Skip to content

Conversation

@locobott
Copy link
Contributor

@locobott locobott commented Jun 6, 2025

I just removed the line of code that prevents empty inline queries from being matched using the pattern parameter when creating an instance of an InlineQueryHandler.

update.inline_query is assumed to always have the query property, which I can only assume is always the case, as the update.inline_query object must not be None in this case anyway.

Also added myself to AUTHORS.rst

I haven't modified any of the documentation as I feel like this changes makes the documentation more accurate, as the expected behavior is now in place.

@Poolitzer
Copy link
Member

Could you add a test which checks that this works now? If you would like pointers where/how feel free to ask, here or in the dev chat.

@Bibo-Joshi Bibo-Joshi added the 🔌 bug pr description: bug label Jun 6, 2025
Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

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

Thanks for the pr. I left a comment on the test below. please also

  • have a look at the failing pre-commit run. Please run pre-commit install in your local clone to ensure the hooks run before the commit. see also our contrib guide. running black via pip install black && black . should fix the current issues
  • add the file pointed out here. Use bugfixes instead of other. You can change the text to a more descriptive explanation. It will appear in the changelog.

@locobott
Copy link
Contributor Author

Thanks for the pr. I left a comment on the test below. please also

  • have a look at the failing pre-commit run. Please run pre-commit install in your local clone to ensure the hooks run before the commit. see also our contrib guide. running black via pip install black && black . should fix the current issues
  • add the file pointed out here. Use bugfixes instead of other. You can change the text to a more descriptive explanation. It will appear in the changelog.

I've done about everything I knew how to do from your request. Please review and let me know if something is missing and how to fix it.

Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

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

Thank you very much for the contribution!

@Bibo-Joshi Bibo-Joshi merged commit 1457679 into python-telegram-bot:master Jun 15, 2025
26 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🔌 bug pr description: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants