Is there support for 'urn:xmpp:mam:2' on openfire?

Hi, When I sent this package:

<iq xmlns="jabber:client" type="set" id="cd29f413-1e89-4cec-8831-9c078976d2be">
    <query xmlns="urn:xmpp:mam:2" queryid="cd29f413-1e89-4cec-8831-9c078976d2be">
        <set xmlns="http://jabber.org/protocol/rsm">
            <before/>
            <max>30</max>
        </set>
        <x xmlns="jabber:x:data" type="submit">
            <field var="FORM_TYPE">
                <value>urn:xmpp:mam:2</value>
            </field>
            <field var="with">
                <value>user@example.com</value>
            </field>
        </x>
    </query>
</iq>

I’m receiving this package:

<iq type="error" id="cd29f413-1e89-4cec-8831-9c078976d2be" to="me@example.com/mobile" xmlns="jabber:client">
    <query xmlns="urn:xmpp:mam:2" queryid="cd29f413-1e89-4cec-8831-9c078976d2be">
        <set xmlns="http://jabber.org/protocol/rsm">
            <before/>
            <max>30</max>
        </set>
        <x xmlns="jabber:x:data" type="submit">
            <field var="FORM_TYPE">
                <value>urn:xmpp:mam:2</value>
            </field>
            <field var="with">
                <value>user@example.com</value>
            </field>
        </x>
    </query>
    <error code="503" type="cancel">
        <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    </error>
</iq>

Is there any support on openfire related with this reason?

2 Likes

I am having the same error, however I’ve tried with 0, 1 and 2 using stanza.io
Were you able to fix this?


UPDATE: I fixed it. Apparently openfire isn’t supporting urn:xmpp:mam:2 so I changed everything in my library to use 1 and it is working.

Hi @gmartin. Could you please share a package sample (<iq>...</iq>) which should work with openfire? I tried to use this one:

<iq xmlns="jabber:client" type="set" id="cd29f413-1e89-4cec-8831-9c078976d2be">
    <query xmlns="urn:xmpp:mam:1" queryid="cd29f413-1e89-4cec-8831-9c078976d2be">
        <set xmlns="http://jabber.org/protocol/rsm">
            <before/>
            <max>30</max>
        </set>
        <x xmlns="jabber:x:data" type="submit">
            <field var="FORM_TYPE">
                <value>urn:xmpp:mam:1</value>
            </field>
            <field var="with">
                <value>user@example.com</value>
            </field>
        </x>
    </query>
</iq>

(changed mam version to 1), but still get:

<iq type="error" id="cd29f413-1e89-4cec-8831-9c078976d2be" to="user@domain/Office">
<error code="501" type="cancel">
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
</error>
</iq>

Dismissed. I was able to get results with this query:

<iq id="62582888-1cf1-485f-b575-0ab904688d08:sendIQ" type="set" from="test2@mopbook/converse.js-75072354">
  <query xmlns="urn:xmpp:mam:2" queryid="0cc75303-9141-448a-b7b4-3ef1451f8e8f">
    <x xmlns="jabber:x:data" type="submit">
      <field type="hidden" var="FORM_TYPE">
        <value>urn:xmpp:mam:2</value>
      </field>
      <field var="with">
        <value>test1@mopbook</value>
      </field>
    </x>
    <set xmlns="http://jabber.org/protocol/rsm">
      <max>50</max>
      <before/>
    </set>
  </query>
</iq>