diff --git a/src/utils.js b/src/utils.js index 01d8bb4..97a98e6 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1722,7 +1722,11 @@ function filterDistributeKeys(value, keys = DISTRIBUTE_KEYS) { } async function distributeUpdate(value, id, type) { - await natsServer.publish(`${type}s.${id}.object`, { ...value, _id: id }); + const normalizedId = id == null ? id : String(id).toLowerCase(); + await natsServer.publish(`${type}s.${normalizedId}.object`, { + ...value, + _id: normalizedId, + }); } async function distributeStats(value, type) {