事件

import { Im } from "@relationlabs/im";

myIm.bind(Im.RECEIVE_MSG_OK, (e) => {
    const message = e['im-message']
})

Name

Description

Callback Params

Im.CONNECT_OK

成功连接socket时触发

Im.CONNECT_ERR

socket错误时触发

Im.CONNECT_CLOSE

socket关闭时触发

{ reason: '' }

Im.RECEIVE_MSG_OK

连接socket之后有新消息时触发

{ 'im-message': { channelUuid, sendUuid, from, content } }

---

Last updated