Chat functionality and capability question

I figured out a solution, still open to other solutions if theres a better one out there.
I didnt realise the sendChat() returns a promise that has all the message info, e.g try {
const msg = await client.sendChat(message);
console.log(msg.id, ‘is the id’);
console.log(msg.message, ‘is the message’);
console.log(msg.receiver.name, ‘is the receiver’);
console.log(msg.sender.name, ‘is the sender’);
}
catch (error) {
console.error(error);
} I’ve created a class in the server that will store these values and have front end logic to display them in the custom chat UI

an sdk method to retrieve the chat data would be very nice though …

1 Like