Receiving chat messages
To be able to receive chat messages you need to implement a method
onChatUpdates()
method from callback DyteMeetingRoomEventsListener
. You can
subscribe to this events by calling
meeting.addMeetingEventsListener(dyteMeetingRoomEventsListener)
void onChatUpdates(
newMessage: Boolean,
message: DyteChatMessage?,
messages: List<DyteChatMessage>
) {
// your code to handle new chat message
}
Here, the message
is of type Message
, as defined in
introduction. messages
is a list of all chat messages in the
meeting, which is the same as meeting.chat.messages
.
When a chat message is received, the meeting.chat.messages
list is also
updated.