Skip to main content

sendChatMessageTo(participantSessionId, text)

Send a private chat message

caution

join() must be called before calling this method

Sends a text message to a single participant only. The participantSessionId is the _id value from the participantJoined event or from the join() result.

JavaScript
meeting.sendChatMessageTo(participantSessionId, "This message is just for you.");

Both the sender and the recipient receive the message through the chatMessageReceived event with recipientParticipantSessionId set. No other participant sees it, and it is hidden from everyone else in the chat history.

info

On failure the server replies with a chatMessageError event. Possible reasons include "Recipient is not in this meeting", "Recipient is offline", and "Invalid recipient" (for example, sending to yourself).