MessagingPublisher
public protocol MessagingPublisher : Publisher where Self.Failure == Never, Self.Output == Result<ResponseMessageData, Error>
A MessagingPublisher is a Combine that takes care of responding to user-triggered events and publish streams of responses.
The MessagingViewModel
class relies on this publisher to get the stream of new messages available for the UI. This publisher nevers
fails and emits Array of MessageData
-
Tells the publisher to post a message.
Declaration
Swift
func postMessage(text: String, memoryOptions: MemoryOptions?)
Parameters
text
String
-
Tells the publisher to post a message
Declaration
Swift
func postMessage(type: PostbackType, postbackData: PostbackData, memoryOptions: MemoryOptions?)
Parameters
type
PostbackType.
postbackData
PostbackData.
-
Tells the publisher that the view is loaded and it’s ready to perform any initialization (e.g. fetching data, …)
Declaration
Swift
func load()