Skip to main content

Overview

When the server detects non-critical issues during connection, it sends a separate conversation.connected.warning event immediately after the conversation.connected.success event to inform the client without terminating the connection.

Event Structure

Event Properties

string
Event type. Always "conversation.connected.warning" for this event.
string
Warning message describing the non-critical issue that occurred.Example: "Warning: Found 2 avatars with the same name 'MyAvatar'. Using the most recently updated one (avatarId: abc-123)"

When This Event is Sent

This event is sent immediately after conversation.connected.success when non-critical issues are detected during the connection process.

Common Scenarios

Duplicate Avatar Names

When connecting using the name parameter and multiple avatars share the same name, the server will:
  1. Automatically select the most recently updated avatar (based on updated_at timestamp)
  2. Send conversation.connected.success event first
  3. Send conversation.connected.warning event with details about the duplicate names and which avatar was selected
  4. Continue with the connection normally

Usage Example

Message Sequence

When a warning occurs, you will receive events in this order:
  1. conversation.connected.success - Connection established successfully
  2. conversation.connected.warning - Warning about non-critical issue
  3. Other events continue normally (e.g., realtime.session.created)

Best Practices

  • Always handle warning messages in your application
  • Display warnings to users so they are aware of potential issues
  • Consider using avatarId instead of name to avoid duplicate name scenarios
  • Log warning messages for debugging purposes