Skip to main content

Enhancing chat experience

Create an engaging chat experience with modern chat features users expect.

Thread replies

Send a thread reply using a client SDK

await chatkitty.sendMessage({
message: parentMessage,
body: 'this is a message'
});

List a thread replies under a message

const result = await chatkitty.listMessages({ parent });

Retrieve a thread reply parent

const result = await chatkitty.retrieveMessageParent({ message });

Emoji reactions

React to a message by passing the emoji's alias to the reactToMessage SDK function.

const result = await chatkitty.reactToMessage({ message, emoji })

Observe new reactions using the onMessageReactionAdded startChatSession callback function.

const result = chatkitty.startChatSession({
channel,
...
onMessageReactionAdded: (message) => {
// update UI
}
...
});

Remove reactions using the removeReaction SDK function.

const result = await chatkitty.removeReaction({ message, emoji })

Observe removed reactions using the onMessageReactionRemoved startChatSession callback function.

const result = chatkitty.startChatSession({
channel,
...
onMessageReactionRemoved: (message) => {
// update UI
}
...
});

Multimedia attachments

Send a file message to attach multimedia in a conversation.

await chatkitty.sendMessage({
channel,
file,
progressListener: {
onStarted: () => {
// upload started
},
onProgress: (progress) => {
// uploading...
},
onCompleted: () => {
// done
}
}
});

In-app notifications

Use the onNotificationReceived SDK listener to observe in-app notifications.

 chatkitty.onNotificationReceived((notification) => {
// Update UI
})

Typing indicators

Send keystokes when a user is typing using the sendKeystrokes SDK function.

await chatkitty.sendKeystrokes({ channel, keys: draft.text });

Observe when a user starts typing using onTypingStarted SDK function.

const result = chatkitty.startChatSession({
channel,
...
onTypingStarted: (user) => {
// update UI
}
...
});

Observe when a user stops typing using onTypingStopped SDK function.

const result = chatkitty.startChatSession({
channel,
...
onTypingStopped: (user) => {
// update UI
}
...
});

Presence indicators

Check a user's presence status using the presence property on a user object

Observe when a user comes online or goes offline using the onUserPresenceChanged SDK function.

 chatkitty.onUserPresenceChanged((user) => {
const status = user.presence.status;

// Update UI
})
note

Users must share at least one mutual channel to be able to observe each other's presence.