EPChatMessageViewControllerDelegate
public protocol EPChatMessageViewControllerDelegate : NSObjectProtocol
The EPChatMessageViewController delegate protocol composed of methods allowing to catch specific EPChatMessageViewController events.
-
epChatMessageViewControllerCustomInitialization(controller:)
Default implementationCalled when the controller setup is done to allow custom initializations.
Default Implementation
Declaration
Swift
func epChatMessageViewControllerCustomInitialization(controller: EPChatMessageViewController)
Parameters
controller
The controller on which custom intializations can be done.
-
epChatMessageViewControllerMessageDidUpdate(controller:lastMessage:chatConversation:)
Default implementationCalled when the last chat conversation message has been created/updated.
Default Implementation
Declaration
Swift
func epChatMessageViewControllerMessageDidUpdate(controller: EPChatMessageViewController, lastMessage: EPChatMessage?, chatConversation: EPChatConversation)
Parameters
controller
The controller from which this method is called.
lastMessage
The last chat conversation message.
chatConversation
The last message chat conversation.
-
epChatMessageViewControllerChatConversationContextDidChange(controller:context:insertions:updates:)
Default implementationCalled when the chat conversation context has been updated.
Default Implementation
Declaration
Swift
func epChatMessageViewControllerChatConversationContextDidChange(controller: EPChatMessageViewController, context: [EPContextObject], insertions: [EPContextObject], updates: [EPContextObject])
Parameters
controller
The controller from which this method is called.
context
The chat conversation context.
insertions
The objects that have been added to the chat conversation context.
updates
The objects that have been updated in the chat conversation context.
-
epChatMessageViewControllerCustomInputType(controller:customInputTypeId:)
Default implementationCalled when a custom input type is required by the bot.
Default Implementation
Declaration
Swift
func epChatMessageViewControllerCustomInputType(controller: EPChatMessageViewController, customInputTypeId: String) -> EPCustomInputType?
Parameters
controller
The controller from which this method is called.
customInputTypeId
The custom input type id.
Return Value
An EPCustomInputType object representing the UI to show for this input.
-
epChatMessageViewControllerBotDidFinish(controller:context:)
Default implementationCalled when the bot is finished. If the bot ends with a button, it is called when the user touches the button. Otherwise, it is called when the end message is displayed.
Default Implementation
Declaration
Swift
func epChatMessageViewControllerBotDidFinish(controller: EPChatMessageViewController, context: [EPContextObject])
Parameters
controller
The controller from which this method is called.
context
The chat conversation context.
-
epChatMessageViewControllerUserDidInput(controller:content:context:)
Default implementationCalled when a user just answered an input.
Default Implementation
Declaration
Swift
func epChatMessageViewControllerUserDidInput(controller: EPChatMessageViewController, content: EPMessageContent, context: [EPContextObject])
Parameters
controller
The controller from which this method is called.
content
The input answer content.
context
The chat conversation context.
-
epChatMessageViewControllerCustomInputValidator(controller:contextKey:)
Default implementationProvide custom Input Validator.
Default Implementation
Declaration
Swift
func epChatMessageViewControllerCustomInputValidator(controller: EPChatMessageViewController, contextKey: String) -> EPInputValidator?
Parameters
controller
The controller from which this method is called.
contextKey
The contextKey that will be associated with the answer in the context.
Return Value
An EPInputValidator.