powered by Jive Software

Support for 'urn:xmpp:mam:2' in Smack?


I’m requesting the XMPP message archive with Smack 4.3.0-rc1 from our chat server using the MamManager class.
The problem is that the server ignores the start time and delivers all messages to us.
The message that is sent by Smack looks fine:

<iq id='0BezS-23' type='set'>
	<query xmlns='urn:xmpp:mam:1' queryid='9af64244-dbe5-462f-9ba4-7df959dd095b'>
		<x xmlns='jabber:x:data' type='submit'>
			<field var='FORM_TYPE' type='hidden'>
			<field var='start'>

However, it uses ‘urn:xmpp:mam:1’ instead of ‘urn:xmpp:mam:2’ as defined in the newest version of XEP-313.
In all other clients (Windows and iOS) we use ‘urn:xmpp:mam:2’.
So I assume that our chat server might behave differently (wrongly) with version 1.
Is it possible to change this to ‘urn:xmpp:mam:2’ or make it changable?


Certainly, but it is not a priority right now. I am happy however, to add transparent support for mam:2 to MamManager as contract work as part of my Professional Services offer. Feel free to contact me if you are interested.

Do we have solution for this. ? I am facing the same.

Nothing new yet. If you are really dependent on MAM:2, you could bump the namespace in Smacks source code, as the difference between MAM:1 and MAM:2 isn’t too big and the code should still work more or less.

1 Like

The latest releases of Smack 4.4 have support for mam:2.


Oh I did miss that change then :smiley:

1 Like

Thank you @Paul_Schaub and @Flow.

1 Like