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
controllerThe 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
controllerThe controller from which this method is called.
lastMessageThe last chat conversation message.
chatConversationThe 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
controllerThe controller from which this method is called.
contextThe chat conversation context.
insertionsThe objects that have been added to the chat conversation context.
updatesThe 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
controllerThe controller from which this method is called.
customInputTypeIdThe 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
controllerThe controller from which this method is called.
contextThe 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
controllerThe controller from which this method is called.
contentThe input answer content.
contextThe chat conversation context.
-
epChatMessageViewControllerCustomInputValidator(controller:contextKey:)Default implementationProvide custom Input Validator.
Default Implementation
Declaration
Swift
func epChatMessageViewControllerCustomInputValidator(controller: EPChatMessageViewController, contextKey: String) -> EPInputValidator?Parameters
controllerThe controller from which this method is called.
contextKeyThe contextKey that will be associated with the answer in the context.
Return Value
An EPInputValidator.
EPChatMessageViewControllerDelegate Protocol Reference