Search code examples
mongoose-im

Message Archiving Management on MongooseIM returning feature not implementing


I have edited the configuration file of MongooseIM as follows to enable MAM

{mod_mam_odbc_prefs, [pm]},
{mod_mam_odbc_arch, [pm]},
{mod_mam_odbc_user, [pm]},
{mod_mam, []}

After restarting the server, when i send a message it gets stored in the database tables of MAM (2 entries for each message which i don’t know why).

Now, when i send an IQ stanza to fetch these messages, i get “Feature Not Implemented” error in response.

IQ Sent:

<iq type=”get” id=”page1″ to=”exampleserver.com”><query xmlns=”urn:xmpp:mam:tmp”/></iq>

When i tried to discover the features using http://jabber.org/protocol/disco#info, i get the following response.

<feature var=”http://jabber.org/protocol/amp”/>
<feature var=”http://jabber.org/protocol/commands”/>
<feature var=”http://jabber.org/protocol/disco#info”/>
<feature var=”http://jabber.org/protocol/disco#items”/>
<feature var=”iq”/>
<feature var=”jabber:iq:last”/>
<feature var=”jabber:iq:register”/>
<feature var=”msgoffline”/>
<feature var=”presence”/>
<feature var=”presence-invisible”/>
<feature var=”urn:xmpp:carbons:1″/>
<feature var=”urn:xmpp:carbons:2″/>
<feature var=”urn:xmpp:mam:tmp”/>
<feature var=”urn:xmpp:ping”/>
<feature var=”urn:xmpp:sic:1″/>
<feature var=”vcard-temp”/>

Solution

  • You're addressing the IQ to exampleserver.com while you should either address it to bare JID of the sender (i.e. [email protected]) or omit the to attribute completely - then the server will assume it's directed towards the sender's bare JID. Section 10.3.3 of RFC-6120 describes handling of IQs with or without the to attribute. The basic query example from XEP-0313 uses no to attribute in the IQ element.