# Interface MessageExpansionListener

消息扩展监听

#### Version

1.2.0

interface MessageExpansionListener {
onMessageExpansionUpdate(
expansion: Map<string, string>,
message: Message,
): any;
onMessageExpansionRemove(keyArray: string[], message: Message): any;
}

- Defined in message/listener/MessageExpansionListener.ts:7

##### Index

### Methods

onMessageExpansionUpdate
onMessageExpansionRemove

## Methods

### onMessageExpansionUpdate

- onMessageExpansionUpdate(expansion: Map<string, string>, message: Message): any

  消息扩展信息更改的回调

  #### Parameters

  - expansion: Map<string, string>

    消息扩展信息中更新的键值对

  - message: Message

    消息

  #### Returns any

  #### Discussion

  该方法的 expansion 只包含更新的键值对，不是全部的数据。如果想获取全部的键值对，请使用 message 的 expansion 属性。

  - Defined in message/listener/MessageExpansionListener.ts:15

### onMessageExpansionRemove

- onMessageExpansionRemove(keyArray: string[], message: Message): any

  消息扩展信息删除的回调

  #### Parameters

  - keyArray: string[]

    消息扩展信息中删除的键值对 key 数组

  - message: Message

    消息

  #### Returns any

  - Defined in message/listener/MessageExpansionListener.ts:22