Browse SDKs · iOS
Platform
SDKsiOS

Create a reply message

Create a quoted reply with OpenIM iOS SDK.

Copy

Invoke createQuoteMessage:message: on OIMMessageInfo to construct a reply message object quoting an existing original message:

Parameters

ParameterTypeRequiredDescription
textNSString *YesBody text of the new reply message.
messageOIMMessageInfo *YesOriginal message object being quoted, typically obtained from the active conversation list.

Code example

OIMMessageInfo *message =
    [OIMMessageInfo createQuoteMessage:@"Agreed with this approach"
                               message:originalMessage];

Return value

Returns an initialized OIMMessageInfo model with its content type set to quoted reply.

State changes after the call

  1. Local memory instantiation: This method builds a new in-memory message object and does not mutate the original quoted message.
  2. Subsequent dispatch: Call Send a message to deliver the quoted reply.