What you get
- Real-time messaging with delivery confirmations
- Presence tracking and online/offline indicators
- Typing indicators and read receipts
- Message history with search and pagination
Quick start
Using @scalemule/chat
Code example
import { ScaleMuleChat } from '@scalemule/chat'
const chat = new ScaleMuleChat({
apiKey: process.env.SCALEMULE_API_KEY,
tenant: 'acme-corp'
})
// Join a channel and listen for messages
const channel = await chat.channel('support')
channel.on('message', (msg) => {
console.log(`${msg.sender}: ${msg.text}`)
})
// Send a message
await channel.send({ text: 'Hello from the agent!' })