Skip to content

Commit 4b4cff9

Browse files
committed
12112
1 parent 14dad7c commit 4b4cff9

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

OpenFlow/src/Messages/Message.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,20 @@ export class Message {
214214
try {
215215
msg = QueueMessage.assign(this.data);
216216
if (Util.IsNullUndefinded(msg.jwt)) msg.jwt = cli.jwt;
217+
if (!Util.IsNullUndefinded(msg.data)) {
218+
if (typeof msg.data == 'string') {
219+
try {
220+
var obj = JSON.parse(msg.data);
221+
if (Util.IsNullUndefinded(obj.jwt)) {
222+
obj.jwt = msg.jwt;
223+
msg.data = JSON.stringify(obj);
224+
}
225+
} catch (error) {
226+
}
227+
} else {
228+
msg.data.jwt = msg.jwt;
229+
}
230+
}
217231
if (Util.IsNullUndefinded(msg.data.jwt)) msg.data.jwt = msg.jwt;
218232
if (Util.IsNullEmpty(msg.replyto)) {
219233
await cli.sendToQueue(msg);

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.506
1+
0.0.507

0 commit comments

Comments
 (0)