Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ChatUICustomMessageRegistration

Custom message registration configuration

description

Extends the SDK's CustomMessageRegistration with ChatUI-specific display options

example
class GiftMessageElement extends HTMLElement {
// ...
}

const registration: ChatUICustomMessageRegistration = {
messageType: 'custom:gift',
isPersisted: true,
isCounted: true,
digest: (message, language) => {
return language === 'en_US' ? '[Gift]' : '[礼物]';
},
component: {
tagName: 'gift-message',
elementClass: GiftMessageElement
}
};

Hierarchy

  • CustomMessageRegistration
    • ChatUICustomMessageRegistration

Index

Properties

messageType: string

The unique message type identifier (e.g. 'app:custom')

isPersisted: boolean

Whether messages of this type should be persisted in storage

isCounted: boolean

Whether messages of this type should be included in unread count

isStatusMessage?: boolean

Whether this is a status message (transient, not stored)

remoteFileUrlField?: string

The field name in the content that holds the remote file URL (for media messages)

Custom Web Component to render this message type in the chat panel

Methods

  • Custom digest function to generate a summary text for the channel list

    Parameters

    • message: ChatUIMessageModel<Record<string, any>>

      The message model

    • language: string

      Current language code (e.g., 'en_US')

    Returns string

    Digest text displayed in the channel list