@indra.ai/deva 1.1.85 → 1.1.86
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.
- package/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -845,16 +845,16 @@ class Deva {
|
|
|
845
845
|
};
|
|
846
846
|
|
|
847
847
|
// create a hash for the answer and insert into answer meta.
|
|
848
|
-
packet_answer.meta.hash = this.hash(packet_answer);
|
|
848
|
+
packet_answer.meta.hash = this.hash(JSON.stringify(packet_answer));
|
|
849
849
|
|
|
850
|
-
packet.a = packet_answer;
|
|
850
|
+
packet.a = this.copy(packet_answer);
|
|
851
851
|
packet.hash = this.hash(packet); // hash the entire packet.
|
|
852
852
|
|
|
853
853
|
|
|
854
854
|
this.action('answer_talk');
|
|
855
855
|
this.talk(config.events.answer, this.copy(packet)); // global talk event
|
|
856
856
|
|
|
857
|
-
return resolve(
|
|
857
|
+
return resolve(packet); // resolve the packet to the caller.
|
|
858
858
|
}).catch(err => { // catch any errors in the method
|
|
859
859
|
this.action('error');
|
|
860
860
|
return this.error(err, packet, reject); // return this.error with err, packet, reject
|