Can't send chat messages from a background thread

Meeting SDK Type and Version
Linux Meeting SDK v5.17.1.1900

Description
I am trying to send chat messages on a background thread but they do not appear in the actual Zoom chat. I do, however, get the chat message callback with the message contents. For some context, I am using a background thread because I want to send meeting reminder chat messages when there are X minutes left in a meeting. The background thread sleeps until the appropriate time to send the reminder message.

Error?
The chat message is supposedly sent successfully with return value SDKERR_SUCCESS. I even receive the message in the onChatMsgNotification listener correctly. But I do not see the chat message in the actual Zoom meeting chat.

Troubleshooting Routes
I’ve tried upgrading my Meeting SDK to the latest with no luck. I also confirmed I can send the same chat message on the main thread successfully.

How To Reproduce

  1. Set up a project using GitHub - zoom/meetingsdk-linux-raw-recording-sample
  2. Update the code to create a new background thread and send a chat message.
  3. Create a Zoom meeting
  4. Start the sample app so it joins the meeting
  5. Observe that you receive the message you sent on the background thread in the onChatMsgNotification callback
  6. Observe that you do NOT see the chat message in the actual Zoom meeting chat.

Let me know if you need me to provide a minimal sample code repository to reproduce this.

@pre-fullsend Hope you will be fine.

You need to send chat messages from the main thread not from any child or other type of thread.

Hi @freelancer.nak, appreciate the response.

Can I get confirmation from the Zoom engineering team that this is indeed the case? Maybe @chunsiong.zoom can confirm that we have to send chat messages on the main thread?

If this is the case, how do you recommend performing background tasks like waiting for a given amount of time before sending a message without blocking other work on the main thread? An event loop architecture would work but I want to avoid introducing unnecessary complexity if possible.

@pre-fullsend you have to run these in the main thread.

What is the scenario you are trying to achieve?