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 namespacesocket— Socket.IO server options (CORS, transports, etc.)persistence— YourPersistenceAdapterimplementationmessageMiddleware— Array of middleware functions that run before a message is processed/savedmessage—{ 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:
onMessageonEditonDeleteonReadonReactiononStatusChange
See the full type definitions for exact signatures.