Files
NodeBB/src/socket.io/plugins.js
gasoved b0a24d6dd5 refactor: var to const and let (#9885)
* refactor: var to const and let

* fix: missed global bootbox usage

* refactor: align with eslint expectations
2021-10-12 10:26:18 -04:00

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;