SMIConversationClientDelegate

Objective-C

@protocol SMIConversationClientDelegate <NSObject>

Swift

protocol ConversationClientDelegate : NSObjectProtocol

Delegate that handles events related to a conversation.

  • Delegate event that is triggered anytime a entry has been added to a conversation. This will fire for both inbound and outbound entries.

    The subject on the sender can be checked to determine whether a message was sent by a local participant.

    Outbound entries are echoed back on this event due to the chance it could be modified by any configured sensitive data rules. This event is also an acknowledgement that the message has been cached locally.

    The best practice, if choosing to display outgoing entries, is to wait for this event rather than displaying entries directly.

    Declaration

    Objective-C

    - (void)client:(id<SMIConversationClient>)client
        didReceiveEntry:(id<SMIConversationEntry>)entry;

    Parameters

    client

    The SMIConversationClient instance that is managing the current connection.

    entry

    The SMIConversationEntry data model which represents an incoming/outgoing message.

  • Delegate event that is triggered anytime a message’s status has been updated. It is recommended that any current references to an entry with a matching ID are refreshed. It is possible for entries to change type entirely due to backend translation, and any consuming UI should account for that.

    Declaration

    Objective-C

    - (void)client:(id<SMIConversationClient>)client
        didUpdateEntry:(id<SMIConversationEntry>)entry;

    Parameters

    client

    The SMIConversationClient instance that is managing the current connection.

    entry

    The SMIConversationEntry data model that represents an incoming/outgoing message.

  • Delegate event that is triggered when receiving a typing started event from another participant.

    Declaration

    Objective-C

    - (void)client:(id<SMIConversationClient>)client
        didReceiveTypingStartedEvent:(id<SMIConversationEntry>)event;

    Parameters

    client

    The SMIConversationClient instance that is managing the current connection.

    event

    The SMIConversationEntry which contains the typing event as a payload.

  • Delegate event that is triggered when receiving a typing stopped event from another participant.

    Declaration

    Objective-C

    - (void)client:(id<SMIConversationClient>)client
        didReceiveTypingStoppedEvent:(id<SMIConversationEntry>)event;

    Parameters

    client

    The SMIConversationClient instance that is managing the current connection.

    event

    The SMIConversationEntry which contains the typing event as a payload.

  • Delegate event that is triggered by the creation of a conversation for the conversationId associated with the client.

    Declaration

    Objective-C

    - (void)client:(id<SMIConversationClient>)client
        didCreateConversation:(id<SMIConversation>)conversation;

    Parameters

    client

    The SMIConversationClient instance that is managing the current connection.

    conversation

    The SMIConversation object which represents the newly created conversation.

  • Delegate event that is triggered if an unhandled error is detected as part of the normal activity of the In-App Messaging client.

    Declaration

    Objective-C

    - (void)client:(id<SMIConversationClient>)client didError:(NSError *)error;

    Parameters

    client

    The SMIConversationClient instance that is managing the current connection.

    error

    The NSError which triggered this event.