Removing POC code and Whatsapp #96

Merged
rodrigorodriguez merged 14 commits from master into master 2019-05-24 01:37:59 +00:00
3 changed files with 10 additions and 5 deletions
Showing only changes of commit 4351b87973 - Show all commits

View file

@ -10,7 +10,7 @@
"Jorge Ramos <jramos@pobox.com>"
],
"engines": {
"node": "=10.13.0"
"node": "=10.15.2"
},
"license": "AGPL-3.0",
"preferGlobal": true,

View file

@ -136,7 +136,7 @@ export class DialogClass {
function random(low, high) {
return Math.random() * (high - low) + low
}
const idCallback = random(0, 120000000);E
const idCallback = random(0, 120000000);
this.min.cbMap[idCallback] = cb;
await this.step.beginDialog('/hear', { id: idCallback });
}

View file

@ -259,11 +259,16 @@ export class GBVMService extends GBService {
async step => {
const cbId = step.activeDialog.state.cbId;
const cb = min.cbMap[cbId];
step.activeDialog.state.cb = cb;
return await step.next();
},
async step => {
let cb = step.activeDialog.state.cb;
cb.bind({ step: step, context: step.context });
cb(step.result);
await step.endDialog();
return await cb(step.result);
return await step.next();
}
])
);