Event

Listen for different chat-related events (like messages, user actions, etc.) and handle them as they occur.

The full list of events that can be received by the function passed to addEventListener. An event is an object with two keys: type and data.

type

data

Description

status.connected

{}

This indicates the connection to the Chat service has been established.

status.disconnected

{}

This indicates the connection to the Chat service has been lost. The SDK will automatically try to reconnect to the service.

message.new

{message}

A new message has been sent to a subscribed channel.

message.updated

{message}

An existing message from a subscribed channel has been modified.

message.action.new

{message, action}

A new message action has been sent to a subscribed channel.

message.i18n.updated

{message, i18n}

An existing message from a subscribed channel has new or updated translations.

file.upload.progress

{file, percent}

A file sent as part of a message has partially uploaded, use this event to render a progress bar.

file.upload.complete

{file}

A file sent as part of a message has been uploaded successfully.

file.upload.error

{file}

A file sent as part of a message failed to upload.

typing.start

{channelId, userId, deviceId}

The typing indicator start event.

typing.stop

{channelId, userId, deviceId}

The typing indicator stop event.

Last updated

Logo

© Copyright 2024 ALO.ai, Inc. • All Rights Reserved