Skip to content

Commit c0accd6

Browse files
committed
hotfix QueueMessage for new robot
1 parent c7439c1 commit c0accd6

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

OpenFlow/src/Messages/QueueMessage.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import { Base } from "../base";
22

33
export class QueueMessage implements IReplyMessage {
44
public error: string;
5-
public jwt:any;
5+
public jwt: any;
66

7-
public correlationId:string;
8-
public replyto:string;
9-
public queuename:string;
7+
public correlationId: string;
8+
public replyto: string;
9+
public queuename: string;
1010
public data: any;
11-
static assign(o:any):QueueMessage {
11+
static assign(o: any): QueueMessage {
1212
if (typeof o === "string" || o instanceof String) {
1313
return Object.assign(new QueueMessage(), JSON.parse(o.toString()));
1414
}

OpenFlow/src/WebSocketClient.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@ export class WebSocketClient {
269269
async Queue(data: string, replyTo: string, correlationId: string, queuename: string): Promise<any[]> {
270270
var d: any = JSON.parse(data);
271271
var q: QueueMessage = new QueueMessage();
272+
if (this.clientversion == "1.0.80" || this.clientversion == "1.0.81" || this.clientversion == "1.0.82" || this.clientversion == "1.0.83" || this.clientversion == "1.0.84" || this.clientversion == "1.0.85") {
273+
q.data = d.payload;
274+
} else {
275+
q.data = d;
276+
}
272277
q.data = d.payload; q.replyto = replyTo;
273278
q.error = d.error;
274279
q.correlationId = correlationId; q.queuename = queuename;

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.477
1+
0.0.478

0 commit comments

Comments
 (0)