I am using strophe.js and ejabberd for implementing a chat in my site. But I couldn't successfully send a message or retrieve messages using mam. The log is printing the SENT: and RECV: strings. The code I am using to send a message is
var m = $msg({to: 'admin@ks111', from: 'admin@ks111', type: 'chat'}).c("body").t('body');
connection.send(m);
and the SENT string obtained is
SENT: <body rid='3431080199' xmlns='http://jabber.org/protocol/httpbind'><enable xmlns='urn:xmpp:sm:3' resume='false'/><message to='user1@server' from='user2@server' type='chat' xmlns='jabber:client'><body>body</body></message></body>
I tried with the gajim client for no response. But if I am removing the 'body' tag like...
<message to='user1@server' from='user2@server' type='chat' xmlns='jabber:client'><body>body</body></message>
the chat is received properly. The 'body' tag is added with all the requests by default. What could be the issue. Please provide a solution.