From 65046fc984ca9fa357e31756631d48ed25bf538a Mon Sep 17 00:00:00 2001 From: Marin Karamihalev <marin.karamihalev@iopsys.eu> Date: Wed, 5 Apr 2023 15:12:01 +0200 Subject: [PATCH] added msg id to notifyResp --- src/commands/common/notifyResp.ts | 2 +- src/configurations/build.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/common/notifyResp.ts b/src/commands/common/notifyResp.ts index f12af64..f975a89 100644 --- a/src/commands/common/notifyResp.ts +++ b/src/commands/common/notifyResp.ts @@ -6,7 +6,7 @@ const decode: DecodeFn = (msg) => [msg]; const encode: EncodeFn = ({ subscriptionId }) => ({ lookup: "Msg", header: { - msgId: uniq("NOTIFY_RESP@"), + msgId: subscriptionId || uniq("NOTIFY_RESP@"), msgType: "NOTIFY_RESP", lookup: "Header", }, diff --git a/src/configurations/build.ts b/src/configurations/build.ts index 1bf5bfb..deb85fa 100644 --- a/src/configurations/build.ts +++ b/src/configurations/build.ts @@ -256,7 +256,8 @@ const buildConnect: BuildConnectionFn = supportedProto: (proto) => call("GET_SUPPORTED_PROTO", { proto }), _operate: (path, id, resp, input, commandKey) => call("OPERATE", { path, input, id, resp, commandKey }), - _notifyResp: (subscriptionId) => call("NOTIFY_RESP", { subscriptionId }), + _notifyResp: (subscriptionId) => + call("NOTIFY_RESP", { subscriptionId }), on, ...makeRecipes(call, on), disconnect: () => client.end(), -- GitLab