mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
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:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user