Hi,
I have a few apps that ask users for input. I register them like this:
self.listen_event(self.user_answered_cb,
event="telegram_callback"
)
In user_answered_cb
I then split the data from the callback and check if the first part matches the app identifier, i.e. whether this callback is for this app.
call_data = data['data'].split("_")
if call_data[0] != f'/{self.app_identifier}':
return
This works fine but I was wondering whether it is better for overall performance to tell appdaemon only to register for the right callbacks:
self.listen_event(self.user_answered_cb,
event="telegram_callback",
command=f"/{self.app_identifiert}_value"
)
The problem with this is that I have some variable inline keyboards that can change depending on user input and that can make it kinda hard to register all commands.
My question: Which option is better for performance once I have a few dozen apps? Or should I do it completely differently?
Thanks!