mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-31 12:50:46 +01:00
* refactor: var to const and let * fix: missed global bootbox usage * refactor: align with eslint expectations
18 lines
435 B
JavaScript
18 lines
435 B
JavaScript
'use strict';
|
|
|
|
const SocketPlugins = {};
|
|
|
|
/*
|
|
This file is provided exclusively so that plugins can require it and add their own socket listeners.
|
|
|
|
How? From your plugin:
|
|
|
|
const SocketPlugins = require.main.require('./src/socket.io/plugins');
|
|
SocketPlugins.myPlugin = {};
|
|
SocketPlugins.myPlugin.myMethod = function(socket, data, callback) { ... };
|
|
|
|
Be a good lad and namespace your methods.
|
|
*/
|
|
|
|
module.exports = SocketPlugins;
|