How to add custom action / view in EkoMessageListViewController?

Question from vodworks

Since we have to add a custom message in the chat screen, we have tried setting a custom nib to EKOMessageListViewController but it’s not working on sdk. How can we assign our custom view to EKOMessageListViewController table view? Is there any way to receive a user Interaction(Tap) event/delegate to perform custom action?

There is an API for custom cells but the view assigning isn’t supported yet.
Can you give me some design references to ensure I understand your purpose correctly?

Response from Vodworks:

“Below is the design we want to add into custom messages but I tried calling custom nibs from register function it didn’t work.”

Screen Shot 2020-12-18 at 14 18 14

Sorry for the late reply, for the how to custom messages in lastest version you can follow the code below like this:

  1. Create a new instance EkoMessageListViewController
 let messageListVC = EkoMessageListViewController.make(channelId: "ChannelID")
 messageListVC.dataSource = self
  1. For your ViewController need to conform to protocol EkoMessageListDataSource like this:
 ViewController: EkoMessageListDataSource {
    func cellForMessageTypes() -> [EkoMessageTypes : EkoMessageCellProtocol.Type] {
       return [
         .textIncoming: CustomMessageTextIncomingTableViewCell.self
       ]
    }
 }

FYI: for the custom cell need to create with a nib file example:

 CustomMessageTextIncomingTableViewCell.swift
 CustomMessageTextIncomingTableViewCell.nib