Can't retrieve muc archives

Hi,

We're developing an xmpp messenger using ejabbered, release 16.04.

We're having trouble retrieving message archives for mucs. We have verified that both muc and p2p messages are being archived in database, and are able to retrieve peer to peer messages, using guidelines in http://xmpp.org/extensions/xep-0313.html.

Following is an example of our request to server:

<iq
    id="muc_chats_arhives25"
    to="00070210619-ru.ourdomain2016120615301077x@conference.ourdomain" type="set">
  <query xmlns="urn:xmpp:mam:0">
    <set xmlns="http://jabber.org/protocol/rsm">
      <max>30</max>
      <before/>
    </set>
  </query>
</iq>

And the response:

<iq id="muc_chats_arhives25" xml:lang="en" type="error" to="00070210618-ru.ourdomain@ourdomain/iOS-40555DD3-EE95-4F1E-BF34-B93A46A63DD8" from="00070210619-ru.ourdomain2016120615301077x@conference.ourdomain">
<query xmlns="urn:xmpp:mam:0"><set xmlns="http://jabber.org/protocol/rsm"><max>30</max><before/></set></query>
  <error code="501" type="cancel">
    <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
  </error>
</iq>

Please help.

Hi, I installed 16.04,

Hi, I installed 16.04, enabled mod_mam with the default:always option, created an account, logged in, created a room, configured the room to archive, sent a message to the room, then sent a request similar to yours, just replacing the TO attribute with the room full jid (in my case "room1@conference.localhost"), and I got a valid response.

I also tried to make some mistakes, like providing invalid TO address, disabling the option, the module... and I couldn't get exactly the same error than you, that 501.

Apply this patch, compile, reinstall, restart, try again, and see if anything relevant appears in the ejabberd logs when you make the request:

--- a/src/mod_muc_room.erl
+++ b/src/mod_muc_room.erl
@@ -466,7 +466,8 @@ normal_state({route, From, <<"">>,
                        stop -> {stop, normal, StateData};
                        _ -> {next_state, normal_state, NewStateData}
                    end;
-               _ ->
+               SomeError ->
+                   ?INFO_MSG("Some Error: ~n~p", [SomeError]),
                    Err = jlib:make_error_reply(Packet,
                                                ?ERR_FEATURE_NOT_IMPLEMENTED),

Thanks for the

Thanks for the reply,

Currently we have server in the form of a binary. We'll setup a chat server from ejabberd sources and get back to you.

Thanks again, cheers.

You can go to your developer

You can go to your developer machine, install the same erlang and download the same ejabberd sources used in the production machine. Apply the patch, compile the relevant module (or all), and copy the changed *.beam file to the production machine.

Hi, we've compiled server

Hi, we've compiled server from sources and have it running. Currently have some issues creating group chats.

Will get back as soon as we can.

After updating to the latest

After updating to the latest release everything works -)

Muc messages arrive just as p2p archives, everything is fine -)

Syndicate content