-
-
Notifications
You must be signed in to change notification settings - Fork 960
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
<update> object and message is wrong for CustomCommand #1383
Comments
The solution I used for me is: telegram.php -> executeCommand function
|
Thanks for bringing this up @uspilot This is definitely a breaking change, as it changes the way the Update object may have been used in users' projects. Would you be able to share more about your use-case for this? |
I did some censor bot which should delete messages from group chats according to defined rules. So, the GeneralmessageCommand class is used by default to deal with messages. Once this class is created at the first time it receives an Update object. On any later use of this class the pointer to this class has been returned without updating an Update object inside this class. So in fact you have a pointer to the class with Update object which has been sent to this class at the first use of it. So, you have a command class without any information about Update object you have to work with. This bug is “not visible” with webhook (because usually you have just one instance of some command class for each update ), but is essential for getUpdate connection to telegram when you use the same instance of class (in my case GeneralmessageClass) for several updates |
This is solved by #1384, hopefully there will be a release soon... Stay tuned. |
🐞 Bug Report
<--
❗ NEVER put your Telegram API key or any other private details here. (like passwords, user IDs, etc.)
Substitute them like <API_KEY> or <USER_ID> etc.
-->
Required Information
{...}
Summary
CustomCommand doesn't get new Update. CustomCommand always use the first update that has been received
Current behaviour
How to reproduce
Use any CustomCommand and check object
Expected behaviour
object must be current
The text was updated successfully, but these errors were encountered: