fix(hub): deliver message-received events to all:true SSE connections (#507)

The message-received branch of shouldSend() in hub/src/sse/sseManager.ts
checks only connection.sessionId === event.sessionId, ignoring the
connection.all flag. As a result, any SSE connection subscribed with
all: true (to observe events across every session in the namespace)
silently never receives message-received events, even though every
other event type below this branch honors connection.all.

Closes #506

Co-authored-by: huchenxi <huchenxi@lattebank.com>
This commit is contained in:
hu chenxi
2026-04-22 10:41:56 +08:00
committed by GitHub
co-authored by huchenxi
parent 3405b56ff2
commit 1f994e5948
+1 -1
View File
@@ -156,7 +156,7 @@ export class SSEManager {
}
if (event.type === 'message-received') {
return connection.sessionId === event.sessionId
return connection.all || connection.sessionId === event.sessionId
}
if (event.type === 'connection-changed') {