Commit 92b23c8d by Chavee Issariyapat

add senml rewriter

parent e247d158
......@@ -6,6 +6,15 @@ function rewriteTopic(topic, op, groupid, clientid, output) {
case '@msg' :
return modify.insertWordIntoTopic(topic, '!'+groupid, 1);
case '@feed' :
if (chunk[1] == 'senml') {
if (chunk[2]=='update' || chunk[2].startsWith('update:')) {
return modify.insertWordIntoTopic(topic, clientid, 3);
}
else return topic;
}
else return topic;
case '@shadow' :
if (chunk[1] == 'data') {
if (chunk[2]=='get' || chunk[2]=='update' || chunk[2].startsWith('get:') || chunk[2].startsWith('update:')) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment