Skip to main content

Overview

There are two kinds of messages inside a meeting, and both work only during the meeting: Both support sending to everyone and private messages: pass nil for targetId to send to everyone, or a member’s uid to send privately.
Calling them when not in a meeting throws SMeetingError.notInMeeting.

Send chat messages

ChatMsgType values: .text (default), .file, .pic, .sound. The SDK doesn’t upload or download the file itself; it only delivers the message content, and how to render it is up to your UI.

Receive chat messages

The sender’s nickname isn’t in the event; look it up in the member list with uid:
If you echo the message locally right after it’s sent successfully, compare data.uid with meeting.currentUserId to deduplicate, so the same message isn’t shown twice.

Custom messages

The content of a custom message is a string, usually your own JSON:
To receive:
Custom messages are a path for your own use; the SDK’s own meeting signaling goes over a separate path, so your message content never conflicts with the SDK.

Disable chat

Chat can be disabled at the room level and at the member level, both set by the host / a co-host.

Room level

Read the current state from RoomInfo.chatDisabled; when it changes, you receive:

Member level

Read the current state from MeetingUserInfo.chatDisabled; when it changes, you receive:
We recommend disabling the input box in the UI directly based on these two states, rather than waiting for sending to fail and then showing a message.