Chat functionality and capability question

I’ve recently integrated the meetings SDK(component view ver 2.18.2) into my app(.net & vanilla js) and I am currently trying to integrate its chat functionality into my app.

There’s no code here, this is more for asking for advice

In my application I have a chat column on the right, I am either hoping to access the chat data through the sdk to display it there as well as send messages, I am aware you can do this through client.sendMessage() which is working for me, but I can’t see any method to retrieve the chat data from the meeting so I can display it in my custom UI. Does this exist? if not, then the next option would be to render the chat component onto that div which i’ve successfully tried by specifying it in the client.init method, however, that divs visibility would need to be toggleable, and I can’t see an option for switching on and off the components

I am aware this is all possible with the video SDK but using that wont be an option sadly

Pointers would be greatly appreciated

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