Merge pull request #436 from SyncrowIOT/add-check-log-to-trace-the-map-issue

fix: add validation for missing properties in device status logs
This commit is contained in:
faljawhary
2025-06-25 05:32:50 -06:00
committed by GitHub

View File

@ -51,6 +51,9 @@ export class TuyaWebSocketService {
this.client.message(async (ws: WebSocket, message: any) => {
try {
const { devId, status, logData } = this.extractMessageData(message);
if (!Array.isArray(logData?.properties)) {
return;
}
if (this.sosHandlerService.isSosTriggered(status)) {
await this.sosHandlerService.handleSosEventFirebase(devId, logData);
} else {