From c720d78c391460e0af7704f535926589cf3a9e65 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 5 Dec 2016 14:39:34 +0000 Subject: [PATCH] Ensure runtime event notification gets cleared on restart --- red/api/comms.js | 2 +- red/runtime/nodes/flows/index.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/red/api/comms.js b/red/api/comms.js index ba64f7a38..49fb669c2 100644 --- a/red/api/comms.js +++ b/red/api/comms.js @@ -33,7 +33,7 @@ function handleStatus(event) { publish("status/"+event.id,event.status,true); } function handleRuntimeEvent(event) { - publish("notification/"+event.id,event,event.hasOwnProperty('text')); + publish("notification/"+event.id,event,true); } function init(_server,runtime) { server = _server; diff --git a/red/runtime/nodes/flows/index.js b/red/runtime/nodes/flows/index.js index 234d9e30c..b0358235e 100644 --- a/red/runtime/nodes/flows/index.js +++ b/red/runtime/nodes/flows/index.js @@ -289,6 +289,8 @@ function start(type,diff,muteLog) { } } events.emit("nodes-started"); + events.emit("runtime-event",{id:"runtime-state"}); + if (!muteLog) { if (diff) { log.info(log._("nodes.flows.started-modified-"+type));