Skip to content

Commit

Permalink
Fix parameter passing to payload mapper when topic path contains no c…
Browse files Browse the repository at this point in the history
…hannel

Signed-off-by: Vadim Guenther <vadim.guenther@bosch.io>
  • Loading branch information
VadimGue committed May 21, 2021
1 parent edafcd5 commit 54ec879
Showing 1 changed file with 13 additions and 3 deletions.
Expand Up @@ -65,9 +65,19 @@ function mapFromDittoProtocolMsgWrapper(dittoProtocolMsg) {
let namespace = splitTopic[0];
let name = splitTopic[1];
let group = splitTopic[2];
let channel = splitTopic[3];
let criterion = splitTopic[4];
let action = splitTopic[5];

let channel;
let criterion;
let action;
if (group !== "things"){
channel = "undefined";
criterion = splitTopic[3];
action = splitTopic[4];
}else{
channel = splitTopic[3];
criterion = splitTopic[4];
action = splitTopic[5];
}

let path = dittoProtocolMsg.path;
let dittoHeaders = dittoProtocolMsg.headers;
Expand Down

0 comments on commit 54ec879

Please sign in to comment.