Typing status in group chat

So, l am trying to implement typing status detector. lt worked fine for direct message, but it doesn’t work for group chat.
l checked my log output, l find these status message doesn’t have a message type nor a body(which constitutes real time message). For group chat, l find that l have to send stanza with type “groupchat”, and these kind of message needs to have a body. l tried to send stanza without type into a group chat’s conference address, openfire returned a 400 error. l then tried to send message with type “groupchat” and empty body, openfire returned a 400 error as well.
Do l have to put a special string in the body to indicate this message is for typing status and should not be displayed? Or there is an actual way to send someone’s typing status into the group chat’s conference address?

well… coming back to it, l kind of find a bypass solution. l just have to send broadcast, can be real time message for groupchat, to all users with specific tag, so l can filter the broadcast and display typing status correct for group chat.

It sounds like you are trying to create your own solution for the ‘typing’ notification. I would advice against that.

Openfire is an XMPP server. By extension, your client is an XMPP client. One of the advantages of the XMPP protocol is that it is very feature rich. The ‘typing’ notification that you are after is defined in XMPP, in a specification called XEP-0085 Chat State Notifications.

I strongly recommend using that to base your solution on, instead of rolling your own. You’re very likely able to benefit from others that have already done a lot of the work for you, and compatibility with other clients will be improved!