# WebChat Emits
# chat:message
Send message to hey
# Payload text message
{
id: 'unique id',
text: 'text',
type: 'client',
}
# Payload multimedia message
{
id: 'unique id',
type: 'client',
medias: [
{
id: 'unique id',
content: 'base64',
contentType: 'contentType',
filename: 'filename',
size: 'filesize'
}
]
}
# Example
client.emit('chat:message', message);
# join:client
Create a new customer or user to identify the user who sends messages
// userObject
{
username: 'username',
email: 'email', // required
name: 'name',
phone: '',
}
# Example
client.emit('join:client', { slug: heyToken, user: userObject })
# channel:info
Get the info from the hey channel
# Example
client.emit('channel:info', { slug: heyToken })