From 29b15611ee8b5301f0a26de406d09d0b7d0502f0 Mon Sep 17 00:00:00 2001 From: John Swarbrick Date: Sat, 7 Mar 2026 12:11:42 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20set=20=20to=20'Flood'=20per=20CAP?= =?UTF-8?q?=201.2=20=C2=A73.2.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/functions/processMessage.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/functions/processMessage.js b/lib/functions/processMessage.js index 055820f..76e6805 100644 --- a/lib/functions/processMessage.js +++ b/lib/functions/processMessage.js @@ -56,6 +56,11 @@ module.exports.processMessage = async (event) => { // If the last message is active then update references and msgtype updateReferences(lastMessage, xmlResult) + // Set to describe the hazard type per CAP 1.2 ยง3.2.4. + // The upstream FWIS system incorrectly sends msgType values ("Alert", + // "Update", "Cancel") or internal action codes in this field. + xmlResult.alert.info[0].event[0] = 'Flood' + const message = new Message(xmlResult) const validationResult2 = await validate(message.data.alert, xsdSchema)