@phenomlab Success! Thank you for your help.
How to "emit" an event from the plugin with callback
Solved Technical Support
I am trying to emit(event, payload, callback) from the plugin, but I am getting "Error: Callbacks are not supported when broadcasting". Without the callback the event does propagate.
From the client however, the emit with callback works without a problem.
Anyone knows the proper way to do this?
PitaJ Global Moderator Plugin & Theme Devreplied to JJSagan on last edited by
@jjsagan what context is this in?
yariplus Community Rep
You are broadcasting, sending to multiple sockets. So there is no callback.
The client only sends to one socket, the server, so you get a callback.
If you need to send data back to the server, then emit another event from the client.
You should give more details, there's probably a better way to do what you need.
Copyright © 2023 NodeBB | Contributors