Possible to catch custom socket messages in a plugin?
-
Hi,
I'm trying to catch a few custom socket messages from my plugin. Is there currentely a nice way to do so?
Cheers.
Edit:
This seems to work for now, not the fanciest way but it works:ModulesSockets = module.parent.require('./socket.io/modules'); ... ModulesSockets.custom = customSockets;
It will respond to api:modules.custom.func.
-
@Schamper
hello, i m also trying to use Sockets in my plugin, but i'm unable to find resources where it is written how to use it with NodeBB. if you have successfully written or made use of Socket can you please share it. by pasting here. -
Copyright © 2024 NodeBB | Contributors