Skip to main content

Receiving chat messages

The object emits events when new chat messages are received. You can listen for the chatUpdate event to log when a new chat message is received.'chatUpdate', ({ message, messages }) => {
console.log(`Received message ${message}`);
console.log(`All messages in chat: ${messages.join(', ')}`);

Here, the message is of type Message, as defined in introduction. messages is a list of all chat messages in the meeting, which is the same as

When a chat message is received, the list is also updated.

console.log(JSON.stringify(;'chatUpdate', () => {