@genesys/web-messaging-client-initializes the message stream before the React component tree mounts, so I’ve been trying to override the onMessageRender hook with a custom TypeScript wrapper. Failed. The markdown parser throws a TypeError: Cannot read properties of undefined when the payload contains nested carousel JSON, and moving the carousel rendering to a separate React component doesn’t fix the media playback crashes. It’s failing on the thumbnail fallback too. Added a WebSocket listener for scroll:ack events to sync position, but the server returns a 400 Bad Request on the acknowledgment payload because the conversationId field gets stripped during the handshake.
Tried wrapping the hook in a useEffect and swapped the markdown library to marked. Still breaks on complex carousels. The WebSocket message format expects a flat JSON object but the serializes it as an array. How do I properly intercept the rendering pipeline without breaking the internal state machine. Need the exact TypeScript interface for the hook override.