jsgar 4.9.1 → 4.9.2
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/dist/gar.umd.js +8 -4
- package/gar.js +8 -4
- package/package.json +1 -1
package/dist/gar.umd.js
CHANGED
|
@@ -1040,10 +1040,14 @@
|
|
|
1040
1040
|
const keyId = keyUpdate.key_id;
|
|
1041
1041
|
const keyName = keyUpdate.name;
|
|
1042
1042
|
|
|
1043
|
-
// Handle key introduction if name is provided
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1043
|
+
// Handle key introduction if name is provided. De-dup only the
|
|
1044
|
+
// serverKey*ToName/Id maps; always invoke the registered handler
|
|
1045
|
+
// so callers see every BatchUpdate-carried key event.
|
|
1046
|
+
if (keyName) {
|
|
1047
|
+
if (!this.serverKeyIdToName.has(keyId)) {
|
|
1048
|
+
this.serverKeyIdToName.set(keyId, keyName);
|
|
1049
|
+
this.serverKeyNameToId.set(keyName, keyId);
|
|
1050
|
+
}
|
|
1047
1051
|
|
|
1048
1052
|
// If no batch handler but key handler exists, call KeyIntroduction handler
|
|
1049
1053
|
if (!hasBatchHandler && keyHandler) {
|
package/gar.js
CHANGED
|
@@ -1034,10 +1034,14 @@ class GARClient {
|
|
|
1034
1034
|
const keyId = keyUpdate.key_id;
|
|
1035
1035
|
const keyName = keyUpdate.name;
|
|
1036
1036
|
|
|
1037
|
-
// Handle key introduction if name is provided
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1037
|
+
// Handle key introduction if name is provided. De-dup only the
|
|
1038
|
+
// serverKey*ToName/Id maps; always invoke the registered handler
|
|
1039
|
+
// so callers see every BatchUpdate-carried key event.
|
|
1040
|
+
if (keyName) {
|
|
1041
|
+
if (!this.serverKeyIdToName.has(keyId)) {
|
|
1042
|
+
this.serverKeyIdToName.set(keyId, keyName);
|
|
1043
|
+
this.serverKeyNameToId.set(keyName, keyId);
|
|
1044
|
+
}
|
|
1041
1045
|
|
|
1042
1046
|
// If no batch handler but key handler exists, call KeyIntroduction handler
|
|
1043
1047
|
if (!hasBatchHandler && keyHandler) {
|