Skip to content
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

Get user from chat_boost with source ChatBoostSourcePremium #1472

Open
Desiders opened this issue Apr 28, 2024 · 2 comments · May be fixed by #1474
Open

Get user from chat_boost with source ChatBoostSourcePremium #1472

Desiders opened this issue Apr 28, 2024 · 2 comments · May be fixed by #1474
Assignees
Labels
enhancement Make it better!

Comments

@Desiders
Copy link
Contributor

aiogram version

3.x

Problem

Currently, user from chat boost always None in UserContextMiddleware: https://github.com/aiogram/aiogram/blob/dev-3.x/aiogram/dispatcher/middlewares/user_context.py#L117-L118, but chat_boost with source ChatBoostSourcePremium always has user that boosted the chat: https://github.com/aiogram/aiogram/blob/dev-3.x/aiogram/types/chat_boost_source_premium.py#L21.

Possible solution

I think it makes sense to add a new condition in the middleware like in https://github.com/aiogram/aiogram/blob/dev-3.x/aiogram/dispatcher/middlewares/user_context.py#L81

Alternatives

No response

Code example

No response

Additional information

No response

@Desiders Desiders added the enhancement Make it better! label Apr 28, 2024
@Desiders
Copy link
Contributor Author

I can do it if you agree

@Olegt0rr
Copy link
Contributor

LGTM, feel free to make PR

@Desiders Desiders linked a pull request May 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Make it better!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants