Skip to main content
Version: Next

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 function
  • voiceRecordingEnabled: Bool. Enables or disables ability to record and send voice messages
  • scrollToLatest: Bool. Enables or disables auto-scroll to latest messages when new ones arrive in open chat
  • linkPreviewEnabled: Bool. Enables or disables link preview generation in messages (OpenGraph)
  • keepSocketActive: Bool. If true, WebSocket connection will be kept active when exiting chat screen. Needed for unread message counter operation
  • keepSocketActiveDuringOperatorSession: Bool. WebSocket connection will be kept active when exiting chat screen until operator closes dialogue
  • surveyCompletionDelay: Int. Survey result submission delay (during this time user can change selection)
  • historyLoadingCount: Int. Number of items loaded per history request
  • showAttachButton: Bool. Display file attachment button
warning

Future versions plan to transition to server-only settings