From 914fecd9b17cb1a73e71925043950b9aadb278c6 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Fri, 21 Apr 2023 22:45:07 +0530 Subject: [PATCH] updated extracting deviceid from scope --- .../io/entgra/device/mgt/plugins/emqx/exhook/ExServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/extensions/emqx-extensions/io.entgra.device.mgt.plugins.emqx.exhook/src/main/java/io/entgra/device/mgt/plugins/emqx/exhook/ExServer.java b/components/extensions/emqx-extensions/io.entgra.device.mgt.plugins.emqx.exhook/src/main/java/io/entgra/device/mgt/plugins/emqx/exhook/ExServer.java index 51da55a647..1951a7bfa3 100644 --- a/components/extensions/emqx-extensions/io.entgra.device.mgt.plugins.emqx.exhook/src/main/java/io/entgra/device/mgt/plugins/emqx/exhook/ExServer.java +++ b/components/extensions/emqx-extensions/io.entgra.device.mgt.plugins.emqx.exhook/src/main/java/io/entgra/device/mgt/plugins/emqx/exhook/ExServer.java @@ -467,8 +467,8 @@ public class ExServer { String deviceType = null; String deviceId = null; for (String scope : scopeArray) { - if (scope.startsWith("device_")) { - String[] scopeParts = scope.split("_"); + if (scope.startsWith("device:")) { + String[] scopeParts = scope.split(":"); deviceType = scopeParts[1]; deviceId = scopeParts[2]; break;