ICMessageHelper

This helper class supports specific message operations such as publishing typing indicators and creating the post back messages.

Methods

+ (void)publishTypingIndicatorOnThread:(ICThread *)thread typing:(BOOL)typing;

Facilitates publication of typing start/stop indicator events to the Webex Connect platform.

Syntax: + (void)publishTypingIndicatorOnThread:(ICThread *)thread typing:(BOOL)typing;

ParametersTypeDescription
threadICThreadThe thread on which the event should occur
typingBOOLPass YES to indicate a typing start event or NO for a stop event

Sample Code:

[ICMessageHelper publishTypingIndicatorOnThread:self.thread typing:YES];

+ (ICMessage )createPostbackMessage:(id)messageData withButton:(ICButton )button;

Creates an instance of ICMessage based on the parameters ICButton and Thread that have been passed to this method.

  Syntax: + (ICMessage ) createPostbackMessage:(id)messageData withButton:(ICButton )button;

Parameters:

ParametersTypeDescription
messageDataICMessageDataThe ICMessageData instance
buttonICButtonThe interacted ICButton for which an ICMessage is created

Return Value: Returns the ICMessage instance which is been created with the parameters passed.

Sample Code:

[ICMessageHelper publishTypingIndicatorOnThread:self.thread typing:YES];

+ (ICMessage )createPostbackMessage:(id)messageData withButton:(ICButton )button;

This method Creates an instance of ICMessage based on the parameters ICButton and Thread that have been passed to this method.

Syntax: + (ICMessage *) createPostbackMessage:(id<ICMessageData>)messageData withButton:(ICButton *)button;

sendClickedEvent

Parameters:

ParameterTypeDescription
messageDataICMessageDataThe ICMessageData instance
buttonICButtonThe interacted ICButton for which an ICMessage is created

Return Value: Returns the ICMessage instance which is been created with the parameters passed.

Sample Code:

ICMessage *messageMO = [ICMessageHelper createPostbackMessage:messageData withButton:selectedQuickReply];