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

Fix issue #1383 with no updates for CustomCommand #1384

Merged
merged 2 commits into from
Apr 26, 2023

Conversation

uspilot
Copy link
Contributor

@uspilot uspilot commented Feb 18, 2023

? !
Type bug
BC Break yes
Fixed issues #1383

Summary

@yzen-dev
Copy link

I look forward to when this PR will be approved. Now the bot in getUpdates mode is useless. Because there is no request update, then all received requests are treated as first request.

Added check NULL update object when execute command without update using $telegram->executeCommand('command') function. This would prevent fatal error caused coming from NULL object used as an argument in setUpdate() method.
@noplanman
Copy link
Member

noplanman commented Apr 25, 2023

Hi @uspilot and @yzen-dev

I see now, this is an issue when multiple requests get handled in the same session.

@TiiFuchs When you have a moment, do you see any issue with merging this? I It should be a safe fix, but maybe I'm missing some side-effect?

Checking this again, I'm struggling to see the problem.

Looking at the code in this PR and testing it on my local machine, the $command_obj already has the same Update object as $this->update, so the code doesn't change anything for me 😕

I'd greatly appreciate it if you could provide some simple command that I can test that illustrates the problem.

Thanks!

@TiiFuchs
Copy link
Member

I'm not able to test this thoroughly, but it looks fine to me too.

Let's merge and test it with all upcoming changes for more fun and adventure!

@TiiFuchs TiiFuchs merged commit c106383 into php-telegram-bot:develop Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants