wickrio-bot-api
Advanced tools
Comparing version 5.80.1 to 5.80.2
{ | ||
"name": "wickrio-bot-api", | ||
"version": "5.80.1", | ||
"version": "5.80.2", | ||
"description": "The official Wickr IO Bot API Framework", | ||
@@ -5,0 +5,0 @@ "main": "src/WickrIOBot.js", |
@@ -145,3 +145,4 @@ const WickrIOAPI = require('wickrio_addon') | ||
let administrators | ||
if (tokens.ADMINISTRATORS && tokens.ADMINISTRATORS.value) { | ||
if (tokens.ADMINISTRATORS_CHOICE && tokens.ADMINISTRATORS_CHOICE.value === 'yes' && | ||
tokens.ADMINISTRATORS && tokens.ADMINISTRATORS.value) { | ||
if (tokens.ADMINISTRATORS.encrypted) { | ||
@@ -650,3 +651,3 @@ administrators = WickrIOAPI.cmdDecryptString( | ||
// If this is an admin then process any admin commands | ||
if (admin !== undefined) { | ||
if (tokens.ADMINISTRATORS_CHOICE && tokens.ADMINISTRATORS_CHOICE.value === 'yes' && admin !== undefined) { | ||
localWickrAdmins.processAdminCommand(sender, vGroupID, command, argument) | ||
@@ -653,0 +654,0 @@ } |
@@ -20,3 +20,4 @@ 'use strict' | ||
supportEncrypt, | ||
addOnToJSON | ||
addOnToJSON, | ||
adminsOptional, | ||
) { | ||
@@ -27,2 +28,3 @@ this.supportsVerification = false | ||
this.addOnToJSON = false | ||
this.adminsOptional = false | ||
@@ -33,2 +35,7 @@ if (addOnToJSON === undefined || addOnToJSON !== true) | ||
if (adminsOptional !== undefined) | ||
this.adminsOptional = adminsOptional | ||
console.log('adminsOptional='+this.adminsOptional) | ||
this.tokenConfig = [ | ||
@@ -61,3 +68,4 @@ { | ||
this.verificationToken = WickrIOConfigure.getVerificationTokens() | ||
this.administratorsToken = WickrIOConfigure.getAdminTokens() | ||
this.administratorsToken = WickrIOConfigure.getAdminTokens(this.adminsOptional) | ||
console.log('adminsOptional='+this.adminsOptional) | ||
@@ -129,11 +137,34 @@ this.encryptToken = { | ||
*/ | ||
static getAdminTokens() { | ||
return { | ||
token: 'ADMINISTRATORS', | ||
pattern: '', | ||
type: 'string', | ||
description: 'Enter the list of administrators', | ||
message: 'Cannot leave empty! Please enter a value', | ||
required: true, | ||
default: 'N/A', | ||
static getAdminTokens(adminsOptional) { | ||
if (adminsOptional) { | ||
return { | ||
token: 'ADMINISTRATORS_CHOICE', | ||
pattern: 'yes|no', | ||
type: 'string', | ||
description: 'Do you want to use administrators [yes|no]', | ||
message: 'Please enter either yes or no', | ||
required: true, | ||
default: 'yes', | ||
list: [ | ||
{ | ||
token: 'ADMINISTRATORS', | ||
pattern: '', | ||
type: 'string', | ||
description: 'Enter the list of administrators', | ||
message: 'Cannot leave empty! Please enter a value', | ||
required: true, | ||
default: 'N/A', | ||
} | ||
] | ||
} | ||
} else { | ||
return { | ||
token: 'ADMINISTRATORS', | ||
pattern: '', | ||
type: 'string', | ||
description: 'Enter the list of administrators', | ||
message: 'Cannot leave empty! Please enter a value', | ||
required: true, | ||
default: 'N/A', | ||
} | ||
} | ||
@@ -170,3 +201,3 @@ } | ||
) | ||
this.tokenConfig.push(this.administratorsToken) | ||
this.tokenConfig.unshift(this.administratorsToken) | ||
} else { | ||
@@ -173,0 +204,0 @@ console.log( |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
99885
2539
15