SDK Settings
ChatConfig model allows changing chat functionality settings and includes connection and network configuration models described above.
Initialization:
Connection settings are a required parameter, other parameters can be changed depending on used functionality:
var chatConfig = ChatConfig(transportConfig: chatTransportConfig)
// Configure additional parameters
chatConfig.searchEnabled = true
chatConfig.voiceRecordingEnabled = true
Parameters:
-
userInputEnabled:Bool. Input field availability for user (ability to write messages) -
shouldUseRemoteConfig:Bool. Use remote config on server.
Following parameters can be configured in it:
searchEnabled:Bool. Enables or disables message history search functionvoiceRecordingEnabled:Bool. Enables or disables ability to record and send voice messagesscrollToLatest:Bool. Enables or disables auto-scroll to latest messages when new ones arrive in open chatlinkPreviewEnabled:Bool. Enables or disables link preview generation in messages (OpenGraph)keepSocketActive:Bool. Iftrue, WebSocket connection will be kept active when exiting chat screen. Needed for unread message counter operationkeepSocketActiveDuringOperatorSession:Bool. WebSocket connection will be kept active when exiting chat screen until operator closes dialoguesurveyCompletionDelay:Int. Survey result submission delay (during this time user can change selection)historyLoadingCount:Int. Number of items loaded per history requestshowAttachButton:Bool. Display file attachment button
warning
Future versions plan to transition to server-only settings