Skip to content

Update builtin.py #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 14, 2021
Merged

Update builtin.py #510

merged 2 commits into from
Mar 14, 2021

Conversation

monte-monte
Copy link

@monte-monte monte-monte commented Feb 20, 2021

Description

In StateFilter check if object is CallbackQuery because it has different structure compared to simple message.

Fixes #508

Type of change

Please delete options that are not relevant.

  • Documentation (typos, code examples or any documentation update)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

This is pretty simple fix, and I don't know how exactly I am supposed to test in properly, but it works with my code which includes state machine and callback queries.

Test Configuration:

  • Operating System: Ubuntu 20.10
  • Python version: 3.8.6

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

In StateFilter check if object is CallbackQuery because it has different structure compared to simple message. This change prevents aiogram#508 bug.
@evgfilim1 evgfilim1 added the bug Something is wrong with the framework label Feb 20, 2021
@JrooTJunior JrooTJunior merged commit 8612a64 into aiogram:dev-2.x Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong with the framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

State filter doesn't work with inline keyboard query callback in groups
3 participants