Link Search Menu Expand Document

Chat Transcript

Table of contents

  1. Overview
    1. Transcript management is out of the SDKs scope.
  2. How is it done
  3. Basic Implementation
    1. Register To Delegate
    2. Implement ChatElementDelegate


Transcript management is out of the SDKs scope.

The SDK enables the host App to provide its own implementation to store, and maintain an updated chat transcript, by listening to triggered events whenever chat elements changes.

The ChatElementDelegate enables you to handle the different messages (incomming message, outgoing message…). The application can then take these messages and perform the desired action. The delegate mentioned above is only an enabler for app developers to use to implement any desired action on the messages, for example: print to the screen or download.

alt text

In the example provided below, the chat messages are collected and then the application can take the file and download it.

You can checkout an implementation example here.

How is it done

The hosting App provides a ChatElementDelegate implementation, on ChatController creation. The hosting App interacts with this delegate in order to be notified when message was attached to the chat.

  • Notifies of an addition of chat element to the chat.
    Calling ChatEleChatElementDelegatementListener.didReceive

Basic Implementation

  • ChatController - Use this class to set ChatElementDelegate.

Register To Delegate

override func viewDidLoad() {
    controller.chatElementDelegate = self

Implement ChatElementDelegate

extension TranscriptDemoViewController: ChatElementDelegate {
    func didReceive(_ item: StorableChatElement!) {