Skip to content

Commit

Permalink
fix(whatsapp.gblib): Enabling Whatsapp.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed May 16, 2019
1 parent 74f5936 commit 4351b87
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"Jorge Ramos <jramos@pobox.com>"
],
"engines": {
"node": "=10.13.0"
"node": "=10.15.2"
},
"license": "AGPL-3.0",
"preferGlobal": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/core.gbapp/services/GBAPIService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
Expand Down
11 changes: 8 additions & 3 deletions packages/core.gbapp/services/GBVMService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,16 @@ export class GBVMService extends GBService {
async step => {
const cbId = step.activeDialog.state.cbId;
const cb = min.cbMap[cbId];
cb.bind({ step: step, context: step.context });
step.activeDialog.state.cb = cb;

await step.endDialog();
return await step.next();
},
async step => {
let cb = step.activeDialog.state.cb;
cb.bind({ step: step, context: step.context });
cb(step.result);

return await cb(step.result);
return await step.next();
}
])
);
Expand Down

0 comments on commit 4351b87

Please sign in to comment.