Smack version 4.3.4
Android 9
MongooseIM 3.3.0
Smack doesn’t seem to like the responses from MongooseIM when calling MamManager.queryArchive.
Please help.
Many thanks in advance.
Exception:
Unparseable Stanza: <message xmlns='jabber:client' from='muc_light_1@example.com/user2@example.com' to='' id='e81d40f4-c86d-474f-a9e7-e06cd8cb3857' type='groupchat'><body>46</body><item-type type='1' mime-type=''/><markable/></message></forwarded></result></message> (Not a valid combination of localpart, domainpart and resource)
Code
MamManager mamManager = MamManager.getInstanceFor(connection, chatRoomID);
MamManager.MamQueryArgs.Builder builder = MamManager.MamQueryArgs.builder()
.setResultPageSizeTo(5)
.limitResultsSince(date);
MamManager.MamQueryArgs mamQueryArgs = builder.build();
MamManager.MamQuery mamQuery = mamManager.queryArchive(mamQueryArgs);
Request
<iq to='muc_light_1@example.com' id='DUgMm-240' type='set'>
<query xmlns='urn:xmpp:mam:1' queryid='a75f5d75-aac5-4625-9a77-e54ea605f7a0'>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'>
<value>urn:xmpp:mam:1</value>
</field>
<field var='start'>
<value>2019-12-01T09:49:40.000+00:00</value>
</field>
</x>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>5</max>
</set>
</query>
</iq>
Response
<message from='muc_light_1@example.com' to='user1@example.com/mobile' id='56d97cef-131f-4265-9a59-f32dbaf89790'>
<result queryid='a75f5d75-aac5-4625-9a77-e54ea605f7a0' xmlns='urn:xmpp:mam:1' id='B651C6UHK5G1'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2019-12-01T09:49:40Z' from='muc_light_1@example.com/user2@example.com'></delay>
<message from='muc_light_1@example.com/user2@example.com' to='' xmlns='jabber:client' id='e81d40f4-c86d-474f-a9e7-e06cd8cb3857' type='groupchat'>
<body>46</body>
<item-type xmlns='custom.example.com' type='1' mime-type=''/>
<markable xmlns='urn:xmpp:chat-markers:0'/>
</message>
</forwarded>
</result>
</message>
<r xmlns='urn:xmpp:sm:3'/>
<message from='muc_light_1@example.com' to='user1@example.com/mobile' id='db60769e-7c35-4ebe-bf1e-70b0dd82d823'>
<result queryid='a75f5d75-aac5-4625-9a77-e54ea605f7a0' xmlns='urn:xmpp:mam:1' id='B651F4M6HHG1'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2019-12-01T09:56:13Z' from='muc_light_1@example.com/user2@example.com'></delay>
<message from='muc_light_1@example.com/user2@example.com' to='' xmlns='jabber:client' id='c04dd394-e582-45c3-b104-6012a60debbd' type='groupchat'>
<body>47</body>
<item-type xmlns='custom.example.com' type='1' mime-type=''/>
<markable xmlns='urn:xmpp:chat-markers:0'/>
</message>
</forwarded>
</result>
</message>
<message from='muc_light_1@example.com' to='user1@example.com/mobile' id='52802079-f623-4848-9d63-2f205c5ff3b8'>
<result queryid='a75f5d75-aac5-4625-9a77-e54ea605f7a0' xmlns='urn:xmpp:mam:1' id='B651FD4A7D01'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2019-12-01T09:56:49Z' from='muc_light_1@example.com/user2@example.com'></delay>
<message from='muc_light_1@example.com/user2@example.com' to='' xmlns='jabber:client' id='50136ba9-70da-4b9a-a71e-baf9a69161e1' type='groupchat'>
<body>48</body>
<item-type xmlns='custom.example.com' type='1' mime-type=''/>
<markable xmlns='urn:xmpp:chat-markers:0'/>
</message>
</forwarded>
</result>
</message>