Filter the chat history from groupchat history

Currently I’m working on Smack client to retrieve chat history from Openfire server using Monitoring Plugin.

I can request all chat history of a particular JID successfully using MamManager.page(). However, I don’t know how to request server to retrieve messages with type=“chat” and not the type=“groupchat”.

I can specially request messages with type=“groupchat” by simply providing a formfield type “with” with MUC JID. But when I provide user JID, server will forward all messages ever sent by the user, including the groupchat messages.

So my question is how to retrieve type=“chat” only messages of a particular user JID?

I know we can filter off the groupchat history at the client side, but I don’t want it to take up bandwidth to transfer unwanted messages from server to client.