Skip to content

feat: WebSocket inbound message push#2

Merged
lucasmpramos merged 2 commits intomainfrom
feature/ws-inbound-push
Feb 8, 2026
Merged

feat: WebSocket inbound message push#2
lucasmpramos merged 2 commits intomainfrom
feature/ws-inbound-push

Conversation

@lucasmpramos
Copy link

Adds a new Gateway WS event for real-time inbound messages (no polling). Includes a safe pub/sub emitter, gateway broadcast, and cleanup.

Notes:

  • Intended for dashboard real-time updates
  • Web UI tool stream remains separate (verbose-gated)

- Add new 'message.inbound' event to GATEWAY_EVENTS
- Create src/infra/inbound-events.ts with pub/sub mechanism
- Emit inbound message events from dispatch-from-config.ts
- Subscribe to inbound events in gateway server and broadcast
- Add proper cleanup in gateway close handler

This allows connected WebSocket clients (e.g., dashboard) to receive
real-time notifications when messages arrive on any channel (WhatsApp,
Telegram, Discord, etc.) without polling.

Event payload includes:
- messageId, sessionKey, channel, accountId
- from, senderName, content, timestamp
- chatType (dm/group), conversationId, threadId
- hasMedia, mediaType, metadata
@lucasmpramos lucasmpramos merged commit c754bcf into main Feb 8, 2026
lucasmpramos added a commit that referenced this pull request Mar 9, 2026
Merges 33 commits from work branch:
- WhatsApp login tool HTTP invoke (openclaw#21/openclaw#25)
- Audio inbound transcription for webchat (openclaw#21)
- TTS audio playback in chat (openclaw#22)
- /media endpoint for audio/image serving (openclaw#19)
- image_generate tool with Gemini (openclaw#20)
- imageReady/mediaReady event pipeline (openclaw#22)
- Chat.send internal routing simplification (openclaw#23)
- Silent reply filter removal (openclaw#24)
- ThinkingDefault shortcut (openclaw#26)

Conflict resolution:
- patches/README.md: unified numbering (our #2-18 + his openclaw#19-26)
- patches/verify-patches.sh: combined both check sets (24 total)
- server-methods/chat.ts: used work version as base (has media pipeline),
  route resolution removal from openclaw#23 is intentional for webchat

Build: clean. Patches: 24/24 passing.

Co-authored-by: Bob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant