@vitalyster is correct to an extent. This is what I have followed to receive typing notifications properly:
After setting up your XMPPMessage, add chatMarkable to the message:
XMPPMessage *xmppMessage = [XMPPMessage messageFromElement:message]; [xmppMessage addMarkableChatMarker];
and then send new xmppMessage object.
- When receiving notification, check if message contains
hasInactiveChatState
orhasComposingChatState
and handle the UI part accordingly.
You guys might need to add some checks according to the project requirement and handling the typing notifications.