From 14f837d1f09866b90d8485726d254aa13ba237b2 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Wed, 7 May 2025 00:42:25 +0200 Subject: [PATCH] EventBus: prevent backflow of messages that originate from CommsServer back into CommsServer --- src/ext/lib/EventBus.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ext/lib/EventBus.ts b/src/ext/lib/EventBus.ts index 8dff62d..c001532 100644 --- a/src/ext/lib/EventBus.ts +++ b/src/ext/lib/EventBus.ts @@ -94,7 +94,9 @@ export default class EventBus { // preventing messages from flowing back to their original senders is // CommsServer's job. EventBus does not have enough data for this decision. - if (this.comms) { + // We do, however, have enough data to prevent backflow of messages that + // crossed CommsServer once already. + if (this.comms && context?.origin !== CommsOrigin.Server) { this.comms.sendMessage({command, config: commandData, context}, context); }