From 3b5634f14bb154b6b840950d79dba8adf88a9c63 Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 27 Nov 2023 00:02:04 +0000 Subject: [PATCH] fix: do not emit events about webxdc update events logged into debug log webxdc --- src/debug_logging.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/debug_logging.rs b/src/debug_logging.rs index cfee96b1c..bcccaaf9f 100644 --- a/src/debug_logging.rs +++ b/src/debug_logging.rs @@ -72,10 +72,12 @@ pub async fn debug_logging_loop(context: &Context, events: Receiver { if let Some(serial) = serial { - context.emit_event(EventType::WebxdcStatusUpdate { - msg_id, - status_update_serial: serial, - }); + if !matches!(event, EventType::WebxdcStatusUpdate { .. }) { + context.emit_event(EventType::WebxdcStatusUpdate { + msg_id, + status_update_serial: serial, + }); + } } else { // This should not happen as the update has no `uid`. error!(context, "Debug logging update is not created.");