You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case for the "on_message" callback where it ought to set a local state based on received message contents. However, these callbacks do not receive the user_data argument like the other callbacks do. Adding the user_data as 2nd argument would break existing code, not sure what to do about that, otherwise I'd submit a PR right away. I'd say either bite the bullet or add another message callback, however the latter is complicated by the fact that there are 2 types of message callbacks - filtered and regular. To switch the behavior during runtime, the inspect module would be needed to get function signature, however I am not sure this is available in CP.
The text was updated successfully, but these errors were encountered:
I have a use case for the "on_message" callback where it ought to set a local state based on received message contents. However, these callbacks do not receive the
user_data
argument like the other callbacks do. Adding theuser_data
as 2nd argument would break existing code, not sure what to do about that, otherwise I'd submit a PR right away. I'd say either bite the bullet or add another message callback, however the latter is complicated by the fact that there are 2 types of message callbacks - filtered and regular. To switch the behavior during runtime, theinspect
module would be needed to get function signature, however I am not sure this is available in CP.The text was updated successfully, but these errors were encountered: