wisper
wisper copied to clipboard
fix: Incorrect event name logging when subscribing with :with option
Fixes https://github.com/krisleech/wisper/issues/215:
Issue Description
when using LoggerBroadcaster, the message flow is as follows::
The method_to_call argument passed from ObjectRegistration to Broadcasters::LoggerBroadcaster is incorrectly interpreted as the event name in the logging, resulting in incorrect logged information.
Solution
This PR ensures that ObjectRegistration / LoggerBroadcaster correctly handles the event and method_to_call argument
Note: Although Broadcasters::SendBroadcaster#broadcast does not require the event argument and only needs the method_to_call argument, all broadcasters are designed to have a consistent #broadcast method interface. Therefore, they should share the same argument structure.
@krisleech hello~ Could you help me take a look at the PR~?