Events

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

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

Name

Description

Callback Params

Im.CONNECT_OK

Triggered by a successful socket connection.

Im.CONNECT_ERR

Triggered by a socket connection error.

Im.CONNECT_CLOSE

Triggered by closing a socket connection.

{ reason: '' }

Im.RECEIVE_MSG_OK

Triggered by receiving a new message after establishing a socket connection.

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

---

Last updated