Link Search Menu Expand Document

Outgoing message

Table of contents


Overview

The display of user side messages.
Displays textual content only.

Html formed message will be displayed with all HTML tags. The message content can be, a typed user input, autocomplete suggestion selection, selected option or channel. The outgoing message component also supports the display of avatar image(not by default), message send status. The message has no length limitation.


How to customize

The outgoing message component supports many customizatins.

To see all supported configuration open OutgoingConfiguration.

lazy var chatConfig = { () -> Bold360AI.ChatConfiguration in
        var config = Bold360AI.ChatConfiguration()
        return config
    }()

    func updateOutgoingConfig() {
        self.chatConfig.outgoingConfig.backgroundColor = UIColor.red
        self.chatConfig.outgoingConfig.textColor = UIColor.yellow
    }

Before & After

Before After
1 1

Message delivery status

When the user sends a message, the message goes through a cycle of states.

  • pending
  • sentSuccess
  • sentFailure

Customize message Status icons

The message status icons are configurable. Icons configuration can be done as follows:

self.chatConfig.outgoingConfig.pendingIcon = UIImage(systemName: "search")
self.chatConfig.outgoingConfig.sentFailureIcon = UIImage(systemName: "search")
self.chatConfig.outgoingConfig.sentSuccessfullyIcon = UIImage(named:"search")

Note: Hiding the status icons can be done by setting them to nil