From 586cfaa7bd01a6f13412e7f8d5bc2e47ed2f5003 Mon Sep 17 00:00:00 2001 From: albaintor <118518828+albaintor@users.noreply.github.com> Date: Thu, 12 Dec 2024 20:22:49 +0100 Subject: [PATCH] Activity sync : compare icons or text --- server/package-lock.json | 11 +++++++++++ server/package.json | 1 + src/app/helper.ts | 2 ++ 3 files changed, 14 insertions(+) diff --git a/server/package-lock.json b/server/package-lock.json index 0043ceb..37bfa4f 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -28,6 +28,7 @@ }, "devDependencies": { "@types/cookie-parser": "^1.4.7", + "@types/cors": "^2.8.17", "@types/express": "^5.0.0", "@types/jest": "^29.5.14", "@types/morgan": "^1.9.9", @@ -953,6 +954,16 @@ "@types/express": "*" } }, + "node_modules/@types/cors": { + "version": "2.8.17", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", + "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", diff --git a/server/package.json b/server/package.json index 30f575f..e914873 100644 --- a/server/package.json +++ b/server/package.json @@ -30,6 +30,7 @@ }, "devDependencies": { "@types/cookie-parser": "^1.4.7", + "@types/cors": "^2.8.17", "@types/express": "^5.0.0", "@types/jest": "^29.5.14", "@types/morgan": "^1.9.9", diff --git a/src/app/helper.ts b/src/app/helper.ts index f3d7520..8e89dae 100644 --- a/src/app/helper.ts +++ b/src/app/helper.ts @@ -183,6 +183,8 @@ export class Helper if (item.media_player_id && item.media_player_id != item2.media_player_id) return false; if (item.command && (item.command as Command)?.entity_id != (item2.command as Command)?.entity_id && (item.command as Command).cmd_id != (item2.command as Command)?.cmd_id) return false; + if (item.type == 'text' && item2.text !== item.text) return false; + if (item.type == 'icon' && item2.icon !== item.icon) return false; } return true; }