I am using MongooseIM to develop a XMPP-based Chat App and I'm trying to implement the number of unread messages in my app.
I'm using XEP-0022 (Message Events) to track when a message is received from the server, received from the client, seen from the other client and XEP-0430 (Inbox) to keep track of unread messages that are read as soon as I retrieve them from MAM.
My main issue here is that, when requesting messages from Inbox, it returns all of the messages and not only the text ones. To clarify: it returns also messages that are sent to ack that a message is received and all of the in-between messages, thus incrementing the unread counter and making it very unrealistic.
What can I do to solve this issue?