# Why function onChatMsgNotifcation not be called back?

**URL:** <https://devforum.zoom.us/t/why-function-onchatmsgnotifcation-not-be-called-back/20445>\
**Category:** Windows\
**Created:** [June 5, 2020, 1:38pm UTC](https://devforum.zoom.us/t/why-function-onchatmsgnotifcation-not-be-called-back/20445 "2020-06-05T13:38:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZhangLiChao](https://avatars.discourse-cdn.com/v4/letter/z/eada6e/32.png) [@ZhangLiChao](https://devforum.zoom.us/u/ZhangLiChao)\
**Post date:** [June 5, 2020, 1:38pm UTC](https://devforum.zoom.us/t/why-function-onchatmsgnotifcation-not-be-called-back/20445/1 "2020-06-05T13:38:59Z")

</div>

I just added a little debug code in function onChatMsgNotifcation which in a subclass of IMeetingChatCtrlEvent. Then builded and run sdk\_demo and sdk\_demo\_v2. When I join a meeting, everything is ok except the function onChatMsgNotifcation not be called back.

Why?

I have tried some other callback event like onUserNameChanged, onChatStautsChangedNotification, them work fine.

Detailed Description

1. SDK version is windows v4.6.21666.0428, download from github on 2020.5.25.

2. Sequence of operating sdk\_demo: Start a meeting by zoom client(5.0.4(2569.0524)) on other PC -\> run sdk\_demo -\> SetDomain-\>Auth-\>API User-\>Join-\>OK-\>join in the meeting after host permission -\> show the meeting ui -\> chat on the zoom’s client -\> no debug output.

3. Sequence of operating sdk\_demo\_v2: Start a meeting by zoom client(5.0.4(2569.0524)) on other PC -\> run sdk\_demo\_v -\> SetDomain-\>Auth-\>Ony Join-\>join-\>join in the meeting after host permission -\> show the meeting ui -\> chat on the host’s zoom client -\> no debug output.

I just add debug print code in onChatMsgNotifcation, as show below:

 ![sdk_demo and v2](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/2/2b2add1f0d68fa8042143d50fcc2647fba70a5e6.jpeg)

By the way, is it related to the Change Notification ([WINDOWS SDK Interface Change Notification](https://devforum.zoom.us/t/windows-sdk-interface-change-notification/314)) which say: “move onChatMsgNotifcation from IMeetingServiceEvent to IChatCtrlEvent”?

Thanks.

---

<div class="post-metadata">

**Author:** ![ZhangLiChao](https://avatars.discourse-cdn.com/v4/letter/z/eada6e/32.png) [@ZhangLiChao](https://devforum.zoom.us/u/ZhangLiChao)\
**Post date:** [June 7, 2020, 3:04pm UTC](https://devforum.zoom.us/t/why-function-onchatmsgnotifcation-not-be-called-back/20445/2 "2020-06-07T15:04:26Z")

</div>

I have find out why.

All the test above is join the meeting which enable meeting waiting room. After I read the post([Zoom SDK with Custom UI support sdk\_demo\_v2 crashes in CreateVideoElement when element type is VideoRenderElement\_ACTIVE](https://devforum.zoom.us/t/zoom-sdk-with-custom-ui-support-sdk-demo-v2-crashes-in-createvideoelement-when-element-type-is-videorenderelement-active/17187)) , I tried disable the meeting waiting room, then sdk\_demo and sdk\_demo\_v2’s work well and onChatMsgNotifaction all be called back.

Then I find some status changed in IMeetingServiceEvent.onMeetingStatusChanged.  
For the meeting which enable the waiting room

1. Joint the meeting.
2. In onMeetingStatusChanged: status=MEETING\_STATUS\_CONNECTING
3. Host premit in
4. In onMeetingStatusChanged: status=MEETING\_STATUS\_INMEETING
5. In onMeetingStatusChanged: status=MEETING\_STATUS\_RECONNECTING
6. In onMeetingStatusChanged: status=MEETING\_STATUS\_CONNECTING
7. In onMeetingStatusChanged: status=MEETING\_STATUS\_INMEETING  
However for the meeting which distable the waiting room, step 3~7 is not exist.

So I try GetMeetingChatController() and setEvent again after step 7 when join meeting which enable waitting room, function OnChatMsgNotifaction work fine. By the way, The pointer to MeetingChatController object from GetMeetingChatController() no change when reconnect the meeting.

Thinks for the post’s author [virupaksha.h](https://devforum.zoom.us/u/virupaksha.h)

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [June 10, 2020, 6:40am UTC](https://devforum.zoom.us/t/why-function-onchatmsgnotifcation-not-be-called-back/20445/3 "2020-06-10T06:40:16Z")

</div>

Hi @ZhangLiChao,

Thanks for the post and the detailed information. The interfaces and callbacks that are related to chat is not available while the participant is in the waiting room, this is by design. The corresponding interfaces and callbacks will only be available when the meeting status is “In meeting”.

On the other hand, when leaving the waiting room and join the main session is a process of leaving the meeting and then rejoin the meeting, that is the reason why you observed the changes 3-7.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![ZhangLiChao](https://avatars.discourse-cdn.com/v4/letter/z/eada6e/32.png) [@ZhangLiChao](https://devforum.zoom.us/u/ZhangLiChao)\
**Post date:** [June 15, 2020, 8:20am UTC](https://devforum.zoom.us/t/why-function-onchatmsgnotifcation-not-be-called-back/20445/4 "2020-06-15T08:20:01Z")

</div>

Thank you very much.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [June 17, 2020, 5:59am UTC](https://devforum.zoom.us/t/why-function-onchatmsgnotifcation-not-be-called-back/20445/5 "2020-06-17T05:59:23Z")

</div>

Closed on June 17, 2020, 5:59am UTC


