This commit is contained in:
Bryan Ashby 2020-09-25 15:41:21 -06:00
parent c53c00c77a
commit fa2b70dbdb
No known key found for this signature in database
GPG Key ID: B49EB437951D2542
2 changed files with 52 additions and 2 deletions

View File

@ -1,17 +1,67 @@
// ENiGMA½
const { MenuModule } = require('./menu_module');
// deps
const async = require('async');
const _ = require('lodash');
exports.moduleInfo = {
name : 'WFC',
desc : 'Semi-Traditional Waiting For Caller',
author : 'NuSkooler',
};
const FormIds = {
main : 0,
};
const MciViewIds = {
main : {
nodeStatus : 0,
quickLogView : 1,
customRangeStart : 10,
}
};
// Secure + 2FA + root user + 'wfc' group.
const DefaultACS = 'SCAF2ID1GM[wfc]';
exports.getModule = class WaitingForCallerModule extends MenuModule {
constructor(options) {
super(options);
this.config = Object.assign({}, _.get(options, 'menuConfig.config'), { extraArgs : options.extraArgs });
this.config.acs = this.config.acs || DefaultACS;
if (!this.config.acs.includes('SC')) {
this.config.acs = 'SC' + this.config.acs; // secure connection at the very, very least
}
}
mciReady(mciData, cb) {
super.mciReady(mciData, err => {
if (err) {
return cb(err);
}
async.series(
[
(callback) => {
return this.prepViewController('main', FormIds.main, mciData.menu, callback);
},
(callback) => {
// const requiredCodes = [
// ];
// return this.validateMCIByViewIds('main', requiredCodes, callback);
return callback(null);
},
],
err => {
return cb(err);
}
);
});
}
};

View File

@ -251,7 +251,7 @@
submit: {
*: [
{
value: { message: null }
value: { messageIndex: null }
action: @method:selectMessage
}
]
@ -799,7 +799,7 @@
}
},
// default prompt entry used by the 'msg_lsit' module
// default prompt entry used by the 'msg_list' module
deleteMessageFromListPrompt: {
art: MSGDELPMPT
mci: {