-
-
Notifications
You must be signed in to change notification settings - Fork 954
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
Unable to add a command that handles web_app_data #1423
Comments
I've not looked deeply into this yet, but since that data gets passed via a message, you should be able to get it inside your class GenericmessageCommand extends SystemCommand
{
public function execute(): ServerResponse
{
$data = $this->getMessage()?->getWebAppData()?->getData();
// check if $data isn't null and do something with it.
}
} |
That's what I'm doing right now. But I think the code has an issue (not only for Web Apps. If But this line makes it so all the command handlers have a That way, when |
@mlocati I feel bad for not having had replied earlier and looked into this more, just didn't have the time. 😕 We're trying to get fresh energy into the project and I trust this will be picked up then, as well as a bunch of other things too! |
🐞 Bug Report
Required Information
RAW update (if available)
Summary
We can launch Web Apps by using the
web_app
key inKeyboard
orInlineKeyboard
reply markups.Web Apps can send some data back to the bot (see the JSON above).
The problem is that (AFAIK) there's no way to create a command that handles it.
$command_tmp
contains 'Webappdata`WebAppDataCommand
class, the command identifier isweb_app_data
WebappdataCommand
class, the command identifier iswebappdata
Because neither
web_app_data
norwebappdata
are the same asWebappdata
,we can't create a command that handles the update.The text was updated successfully, but these errors were encountered: