Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wickrio-bot-api

Package Overview
Dependencies
Maintainers
3
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wickrio-bot-api - npm Package Compare versions

Comparing version 5.80.1 to 5.80.2

2

package.json
{
"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(

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc