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;
Parameters | Type | Description |
---|---|---|
thread | ICThread | The thread on which the event should occur |
typing | BOOL | Pass 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:
Parameters | Type | Description |
---|---|---|
messageData | ICMessageData | The ICMessageData instance |
button | ICButton | The 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:
Parameter | Type | Description |
---|---|---|
messageData | ICMessageData | The ICMessageData instance |
button | ICButton | The 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];
Updated 12 months ago