# Interface MessageReceivedListener

消息扩展监听

#### Version

1.3.0

interface MessageReceivedListener {
onMessageReceived(message: Message, info: ReceivedInfo): void;
onOfflineMessageSyncCompleted(): void;
}

- Defined in message/listener/MessageReceivedListener.ts:8

##### Index

### Methods

onMessageReceived
onOfflineMessageSyncCompleted

## Methods

### onMessageReceived

- onMessageReceived(message: Message, info: ReceivedInfo): void

  消息接收监听

  #### Parameters

  - message: Message

    消息体

  - info: ReceivedInfo

    消息接收信息

  #### Returns void

  - Defined in message/listener/MessageReceivedListener.ts:14

### onOfflineMessageSyncCompleted

- onOfflineMessageSyncCompleted(): void

  离线消息接收完成 远端消息同步完成回调，每次连接成功触发一次 远端没有消息的时候，连接成功后会立即触发 远端有大量历史消息的时候，连接成功会等待消息接收完成之后触发

  #### Returns void

  - Defined in message/listener/MessageReceivedListener.ts:20