XMPPFramework - Unable to Retrieve Chat History fr

2019-07-21 11:05发布

问题:

I am trying to fetch chat history from Openfire server. For that purpose we are done with open fire set up and we added archiving plug in to Openfire as well.

I gone through some Googling and I found that I need to follow XEP-0136. I also found this SO question. I am sending the same stanza to my server but I am getting error code of 501 i.e feature not implemented.

While I go on server and look for archived History than I get that history properly.

Here is the Stanza I am sending:

<iq type="get" id='pk1'>
<list xmlns="urn:xmpp:archive" with="aagh116@ind351.local">
<set xmlns="http://jabber.org/protocol/rsm">
<max>30</max>
</set>
</list>
</iq>

and I response I am receiving:

<iq xmlns="jabber:client" type="error" to="a51@ind351.local/bc191338">
<error code="501" type="cancel">
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">
</feature-not-implemented>
</error>
</iq>

I don't know if some thing wrong at my side or we need to change some server setting..

Please help me to sort out this issue.

回答1:

i dont know if you've realised this, but message archiving is one of the trivial aspects of XMPP. this is one of the most under developed features of XMPP protocol, often leading to lengthy proposal documents that get abandoned because the complexity of it just gets out of hand.

furthermore, you will find that most XMPP servers lack a proper defined message archiving.

if you really want this feature, try ejabbed which has mod_archive that you can enable.

good luck