@indra.ai/deva 1.6.51 → 1.6.52
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 +11 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -872,12 +872,21 @@ class Deva {
|
|
|
872
872
|
else {
|
|
873
873
|
packet_answer.text = result;
|
|
874
874
|
}
|
|
875
|
-
|
|
876
|
-
packet_answer.md5 = this.lib.hash(packet_answer);
|
|
875
|
+
|
|
876
|
+
packet_answer.md5 = this.lib.hash(packet_answer 'md5');
|
|
877
877
|
packet_answer.sha256 = this.lib.hash(packet_answer, 'sha256');
|
|
878
878
|
packet_answer.sha512 = this.lib.hash(packet_answer, 'sha512');
|
|
879
879
|
|
|
880
|
+
packet.q.agent = agent;
|
|
880
881
|
packet.a = packet_answer;
|
|
882
|
+
|
|
883
|
+
delete packet.md5;
|
|
884
|
+
delete packet.sha256;
|
|
885
|
+
delete packet.sha512;
|
|
886
|
+
packet.md5 = this.lib.hash(packet 'md5');
|
|
887
|
+
packet.sha256 = this.lib.hash(packet, 'sha256');
|
|
888
|
+
packet.sha512 = this.lib.hash(packet, 'sha512');
|
|
889
|
+
|
|
881
890
|
this.talk(config.events.answer, this.lib.copy(packet)); // global talk event
|
|
882
891
|
this.talk(`${agent.key}:ask:${packet.id.uid}`, packet);
|
|
883
892
|
}).catch(err => {
|