dt-common-device 7.8.13 → 7.8.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/audit/AuditUtils.js
CHANGED
|
@@ -137,6 +137,9 @@ let AuditUtils = (() => {
|
|
|
137
137
|
if (propertyId === "triggered_externally") {
|
|
138
138
|
audit.propertyName = "Triggered Externally";
|
|
139
139
|
}
|
|
140
|
+
else if (propertyId === "property_not_found") {
|
|
141
|
+
audit.propertyName = "Property Not Found";
|
|
142
|
+
}
|
|
140
143
|
else {
|
|
141
144
|
audit.propertyName = await this.getPropertyName(propertyId);
|
|
142
145
|
}
|
package/dist/config/constants.js
CHANGED
|
@@ -137,7 +137,7 @@ let LocalDeviceService = (() => {
|
|
|
137
137
|
await this.handleOnlineStatus(device, device.status, body.status, auditBody?.source || Service_1.Source.SYSTEM, auditBody);
|
|
138
138
|
}
|
|
139
139
|
else {
|
|
140
|
-
await this.handleOfflineStatus(device, device.status, body.status, auditBody?.source || Service_1.Source.SYSTEM, auditBody);
|
|
140
|
+
await this.handleOfflineStatus(device, device.status, body.status, auditBody?.source || Service_1.Source.SYSTEM, auditBody, body.status.error?.message);
|
|
141
141
|
}
|
|
142
142
|
if (body.state?.batteryPercentage?.value) {
|
|
143
143
|
await this.setBatteryLevel(deviceId, body.state?.batteryPercentage?.value, auditBody?.source || Service_1.Source.SYSTEM, auditBody);
|
|
@@ -278,8 +278,8 @@ let LocalDeviceService = (() => {
|
|
|
278
278
|
await this.eventHandler.onStatusChangeMany(query, newStatus, auditBody, eventType);
|
|
279
279
|
}
|
|
280
280
|
async handleOfflineStatus(device, oldStatus, newStatus, source, auditBody, reason, currentTime) {
|
|
281
|
-
const isExistingStatusOnline = oldStatus?.
|
|
282
|
-
const isExistingStatusOffline = oldStatus?.
|
|
281
|
+
const isExistingStatusOnline = oldStatus?.liveStatus === "ONLINE";
|
|
282
|
+
const isExistingStatusOffline = oldStatus?.liveStatus === "OFFLINE";
|
|
283
283
|
if (isExistingStatusOnline) {
|
|
284
284
|
// Existing status is Online
|
|
285
285
|
newStatus.online = true;
|