Ravex

Configuration

All options you can pass when creating a ChatEngine.

Configuration

new ChatEngine(server, options?)

All top-level options are optional.

Main Option Groups

  • namespace — Socket.IO namespace
  • socket — Socket.IO server options (CORS, transports, etc.)
  • persistence — Your PersistenceAdapter implementation
  • messageMiddleware — Array of middleware functions that run before a message is processed/saved
  • message{ allowEdits?, allowDeletes?, maxMessageLength? }
  • typing{ typingTimeout?, typingThrottle? }
  • presence{ awayTimeout?, heartbeat?, heartbeatInterval? }
  • rateLimit{ maxMessages?, windowMs?, typingThrottle? }

Note: typingThrottle exists in both typing and rateLimit configs for different purposes.

Event Hooks

You can register callbacks for:

  • onMessage
  • onEdit
  • onDelete
  • onRead
  • onReaction
  • onStatusChange

See the full type definitions for exact signatures.

On this page