From 26713bde3c56f86004d862b41446bda54e368a11 Mon Sep 17 00:00:00 2001 From: Moe Date: Sun, 17 Sep 2023 07:48:57 -0700 Subject: [PATCH] better patch for getObjectTagsFromMatrices --- libs/events/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/events/utils.js b/libs/events/utils.js index 22f5bee5..f366fb8d 100644 --- a/libs/events/utils.js +++ b/libs/events/utils.js @@ -836,10 +836,11 @@ module.exports = (s,config,lang) => { function getObjectTagsFromMatrices(d){ if(d.details.reason === 'motion'){ return [getTagWithIcon(lang.Motion)] - }else{ - const matrices = d.details.matrices || [] + }else if(d.details.matrices){ + const matrices = d.details.matrices return [...new Set(matrices.map(matrix => getTagWithIcon(matrix.tag)))]; } + return [getTagWithIcon(d.details.reason)] } function getObjectTagNotifyText(d){ const monitorId = d.mid || d.id