Skip to main content

Custom Message Types

IMKit supports custom message types (distinct from built-in message types) and allows modification of the display format for both built-in and custom message types in the IMKit SDK chat UI.

Creating Custom Message Types​

In addition to using SDK's built-in message types, you can create custom messages based on your business requirements.

tip

For instructions on creating custom message types, refer to the IMLib SDK documentation: Custom Messages.

Custom messages will only be displayed in IMKit's conversation list if their persistentFlag is set to either of these values:

  • MessagePersistent_ISCOUNTED
  • MessagePersistent_ISPERSISTED

If your custom message type includes these properties, you must create a display template for it; otherwise, the IMKit SDK cannot properly render this message type.

Creating and Registering Display Templates for Custom Messages​

IMKit supports custom message cells to control how messages appear in the chat UI. If you've created a custom message type and need it displayed in the conversation interface, you must create a corresponding display template—otherwise, the SDK won't render this message type correctly. See Creating New Message Display Templates in Modifying Message Display Styles.

Reference Resources​

You can refer to the custom message examples RCDTestMessage and RCDTestMessageCell in RC's open-source project SealTalk.