getActiveNodeList -> getActiveConnectionList (be consistent)

This commit is contained in:
Bryan Ashby 2018-11-13 20:03:54 -07:00
parent 5a74cdc8d9
commit d8f0708310
3 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@ const moment = require('moment');
const hashids = require('hashids');
exports.getActiveConnections = getActiveConnections;
exports.getActiveNodeList = getActiveNodeList;
exports.getActiveConnectionList = getActiveConnectionList;
exports.addNewClient = addNewClient;
exports.removeClient = removeClient;
exports.getConnectionByUserId = getConnectionByUserId;
@ -26,7 +26,7 @@ function getActiveConnections(authUsersOnly = false) {
});
}
function getActiveNodeList(authUsersOnly) {
function getActiveConnectionList(authUsersOnly) {
if(!_.isBoolean(authUsersOnly)) {
authUsersOnly = true;

View File

@ -5,7 +5,7 @@
const { MenuModule } = require('./menu_module.js');
const { Errors } = require('./enig_error.js');
const {
getActiveNodeList,
getActiveConnectionList,
getConnectionByNodeId,
} = require('./client_connections.js');
const UserInterruptQueue = require('./user_interrupt_queue.js');
@ -110,7 +110,7 @@ exports.getModule = class NodeMessageModule extends MenuModule {
location : 'N/A',
affils : 'N/A',
timeOn : 'N/A',
}].concat(getActiveNodeList(true)
}].concat(getActiveConnectionList(true)
.map(node => Object.assign(node, { text : node.node.toString() } ))
).filter(node => node.node !== this.client.node); // remove our client's node
this.nodeList.sort( (a, b) => a.node - b.node ); // sort by node

View File

@ -2,9 +2,9 @@
'use strict';
// ENiGMA½
const { MenuModule } = require('./menu_module.js');
const { getActiveNodeList } = require('./client_connections.js');
const { Errors } = require('./enig_error.js');
const { MenuModule } = require('./menu_module.js');
const { getActiveConnectionList } = require('./client_connections.js');
const { Errors } = require('./enig_error.js');
// deps
const async = require('async');
@ -43,7 +43,7 @@ exports.getModule = class WhosOnlineModule extends MenuModule {
return cb(Errors.MissingMci(`Missing online list MCI ${MciViewIds.onlineList}`));
}
const onlineList = getActiveNodeList(true).slice(0, onlineListView.height).map(
const onlineList = getActiveConnectionList(true).slice(0, onlineListView.height).map(
oe => Object.assign(oe, { text : oe.userName, timeOn : _.upperFirst(oe.timeOn.humanize()) })
);