mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-16 03:04:53 -04:00
Fixed kickSessions method.
This commit is contained in:
parent
4d6da8dccf
commit
29c776d30d
1 changed files with 4 additions and 3 deletions
|
@ -33,7 +33,7 @@ const readOnlyManager = require('../db/ReadOnlyManager');
|
||||||
const settings = require('../utils/Settings');
|
const settings = require('../utils/Settings');
|
||||||
const securityManager = require('../db/SecurityManager');
|
const securityManager = require('../db/SecurityManager');
|
||||||
const plugins = require('../../static/js/pluginfw/plugin_defs.js');
|
const plugins = require('../../static/js/pluginfw/plugin_defs.js');
|
||||||
const log4js = require('log4js');
|
import log4js from 'log4js';
|
||||||
const messageLogger = log4js.getLogger('message');
|
const messageLogger = log4js.getLogger('message');
|
||||||
const accessLogger = log4js.getLogger('access');
|
const accessLogger = log4js.getLogger('access');
|
||||||
const hooks = require('../../static/js/pluginfw/hooks.js');
|
const hooks = require('../../static/js/pluginfw/hooks.js');
|
||||||
|
@ -162,7 +162,8 @@ exports.handleConnect = (socket:any) => {
|
||||||
* Kicks all sessions from a pad
|
* Kicks all sessions from a pad
|
||||||
*/
|
*/
|
||||||
exports.kickSessionsFromPad = (padID: string) => {
|
exports.kickSessionsFromPad = (padID: string) => {
|
||||||
if (typeof socketio.sockets.clients !== 'object') return;
|
|
||||||
|
if(socketio.sockets == null) return;
|
||||||
|
|
||||||
// skip if there is nobody on this pad
|
// skip if there is nobody on this pad
|
||||||
if (_getRoomSockets(padID).length === 0) return;
|
if (_getRoomSockets(padID).length === 0) return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue