I am new to XMPP and ejabberd.
and I need to get chat history from ejabberd with XMPP.
I did Googling but didn't got satisfactory Answer.
Any link or idea will be great help.
According to the documentation here, you need to enable mod_mam in your configuration by adding mod_mam to the list of modules. You also need to specify some of the options as given in the documentation. For eg:
mod_mam:
default: roster
request_activates_archiving: true
assume_mam_usage: if_enabled
The default option is never, so you need to set the configuration accordingly.