Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ChatMessageEventListener

export notify

Hierarchy

  • ChatMessageEventListener

Index

Methods

  • Occurs when a message thread is created.

    Each member of the group where the message thread belongs can call this method.

    Parameters

    Returns void

  • Occurs when a message thread is destroyed.

    Each member of the group where the message thread belongs can call this method.

    Parameters

    Returns void

  • Occurs when a message thread is updated.

    This method is triggered when the message thread name is changed or a message in the message thread is updated.

    Each member of the group where the message thread belongs can call this method.

    Parameters

    Returns void

  • Occurs when the current user is removed from the message thread by the admin.

    Parameters

    Returns void

  • Occurs when a command message is received.

    Unlike onMessagesReceived, this callback only contains a command message body that is usually invisible to users.

    Parameters

    • messages: ChatMessage[]

      The received command message(s).

    Returns void

  • onConversationRead(from: string, to?: string): void
  • Occurs when a conversation read receipt is received.

    This callback occurs in either of the following cases:

    • The message is read by the recipient and the conversation read receipt is sent. Upon receiving this event, the SDK sets the isAcked property of the message in the conversation to true in the local database.

    • In a multi-device login scenario, when one device sends a conversation receipt, the server will set the number of unread messages to 0, call the callback method on the other devices, and set the isRead property of the message in the conversation to true in the local database.

    Parameters

    • from: string

      The user who sends the conversation read receipt.

    • Optional to: string

      The user who receives the conversation read receipt.

    Returns void

  • onConversationsUpdate(): void
  • Occurs when the conversation is updated.

    This callback is triggered only when a conversation is added or removed.

    Returns void

  • Occurs when a read receipt is received for a group message.

    Parameters

    Returns void

  • onMessageContentChanged(message: ChatMessage, lastModifyOperatorId: string, lastModifyTime: number): void
  • Occurs when the content of a text message is modified.

    Parameters

    • message: ChatMessage

      The modified message.

    • lastModifyOperatorId: string

      The user ID of the operator that modified the message last time.

    • lastModifyTime: number

      The last message modification time. It is a UNIX timestamp in milliseconds.

    Returns void

  • Occurs when a message reaction changes.

    Parameters

    Returns void

  • Occurs when a delivery receipt is received.

    Parameters

    • messages: ChatMessage[]

      The message(s) for which delivery receipt(s) is sent.

    Returns void

  • Occurs when a read receipt is received for a message.

    Parameters

    Returns void

  • Occurs when a received message is recalled.

    If the recipient is offline when the message is delivered and recalled, the recipient only receives this callback instead of the message.

    Parameters

    Returns void

  • Occurs when a message is received.

    This callback is triggered to notify the user of the message that is received, such as texts or an image, video, voice, location, or file.

    Parameters

    Returns void

Generated using TypeDoc