# Zoom raw recording and chat messaging

**URL:** <https://devforum.zoom.us/t/zoom-raw-recording-and-chat-messaging/106890>\
**Category:** Meeting SDK\
**Created:** [April 1, 2024, 7:03am UTC](https://devforum.zoom.us/t/zoom-raw-recording-and-chat-messaging/106890 "2024-04-01T07:03:32Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![gofmannir](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gofmannir/32/56746_2.png) [@gofmannir](https://devforum.zoom.us/u/gofmannir)\
**Post date:** [April 2, 2024, 10:16am UTC](https://devforum.zoom.us/t/zoom-raw-recording-and-chat-messaging/106890/3 "2024-04-02T10:16:33Z")

</div>

Hi, I’m trying to create a thread that will handle chat messaging in my application this way:

Defining global chatController: in the top on the file

```auto
IMeetingChatController* m_pChatController;

```

Defining it after the bot has joined succesfully:

```auto
m_pChatController = m_pMeetingService->GetMeetingChatController();

std::cout << "Setting up thread" << std::endl;
m_pChatController->SendChatMsgTo("mesasge before thread", 0, ZOOM_SDK_NAMESPACE::SDKChatMessageType_To_All);
thread(ReadResultsAndSendToChat).detach();

```

```auto
void ReadResultsAndSendToChat(){
    std::this_thread::sleep_for(std::chrono::seconds(3));
	std::cout << "trying to send chat in thread" << std::endl;
	SDKError err = m_pChatController->SendChatMsgTo("mesasge in thread", 0, ZOOM_SDK_NAMESPACE::SDKChatMessageType_To_All);

	if (err != SDKERR_SUCCESS) {
		std::cout << "Error occurred sending chat: " << err << std::endl;
	}
}

```

The “mesasge before thread” Sent successfully to the chat,  
But “mesasge in thread” not sent, Without and SDKError.

What could cause that?  
@chunsiong.zoom

I see that this similar to this: [Can't send chat messages from a background thread - #4 by chunsiong.zoom](https://devforum.zoom.us/t/cant-send-chat-messages-from-a-background-thread/100928/4)  
but no answer there too.

I’m trying to achieve that in a certain event, a chat message will be sent.  
The events in my application defined by .txt/.json file that gets updated each X seconds.  
So, I’m trying to setup a thread that will listen to file changes and accordingly send chat messages.

---

_[View the full topic](https://devforum.zoom.us/t/zoom-raw-recording-and-chat-messaging/106890)._
