@indra.ai/deva 1.4.16 → 1.4.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -1
  2. package/package.json +3 -1
package/index.js CHANGED
@@ -551,11 +551,13 @@ class Deva {
551
551
  ***************/
552
552
  answer(packet, resolve, reject) {
553
553
  if (!this._active) return Promise.resolve(this._messages.offline);
554
- this.zone('answer', method);
554
+ this.zone('answer');
555
+
555
556
  const agent = this.agent();
556
557
  const client = this.client();
557
558
  // check if method exists and is of type function
558
559
  const {method,params} = packet.q.meta;
560
+
559
561
  const isMethod = this.methods[method] && typeof this.methods[method] == 'function';
560
562
  if (!isMethod) return resolve(this._methodNotFound(packet)); // resolve method not found if check if check fails
561
563
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.4.16",
3
+ "version": "1.4.18",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -80,6 +80,8 @@
80
80
  "context": false,
81
81
  "zone": "deva",
82
82
  "zones": {
83
+ "question": "🙋‍♂️ Question",
84
+ "answer": "👨‍🏫 Teacher",
83
85
  "load": "🚛 Load",
84
86
  "unload": "🛻 Unload",
85
87
  "init": "🚀 Init",