SDKsiOS
Create a Markdown message
Create a Markdown message through OpenIMCore on iOS.
OpenIMCore bundled with the enterprise SDK exposes Open_im_sdkCreateMarkdownMessage. The returned message JSON corresponds to OIMMessageInfo.markdownTextElem, whose content field is content.
NSString *payloadJSON = @"{\"content\":\"**Project update**\"}";
NSString *messageJSON = Open_im_sdkCreateMarkdownMessage(payloadJSON);
OIMMessageInfo *message = [OIMMessageInfo mj_objectWithKeyValues:messageJSON];This capability is not available through a high-level OIMMessageInfo Objective-C factory. Applications that call Core directly must convert the message JSON in their own binding before using the sending flow. Creation, model conversion, and sending are three separate stages. Receiving clients should safely sanitize untrusted Markdown and provide a plain-text fallback.
Was this page helpful?