我正在使用这些技术:
我发送了以下iq用于查询邮件存档
<iq xmlns="jabber:client" type="get" id="2:retrieve">
<retrieve xmlns="urn:xmpp:archive" with="room123@conference.gunblues" start="2015-01-20T06:53:01.831Z">
<set xmlns="http://jabber.org/protocol/rsm" />
</retrieve>
</iq>
我想要的结果:
<iq xmlns="jabber:client" type="result" id="2:retrieve" to="user1@gunblues/e6432422">
<chat xmlns="urn:xmpp:archive" with="room123@conference.gunblues" start="2015-01-20T06:53:01.831Z">
<from secs="0" jid="user2@gunblues">
<body>abc</body>
</from>
<from secs="1" jid="user2@gunblues">
<body>a2</body>
</from>
<from secs="2" jid="user2@gunblues">
<body>a3</body>
</from>
<from secs="3" jid="user2@gunblues">
<body>a4</body>
</from>
<from secs="4" jid="user2@gunblues">
<body>a5</body>
</from>
<from secs="5" jid="user2@gunblues">
<body>a6</body>
</from>
<from secs="7" jid="user2@gunblues">
<body>a7</body>
</from>
<from secs="7" jid="user2@gunblues">
<body>a8</body>
</from>
<from secs="8" jid="user2@gunblues">
<body>a9</body>
</from>
<from secs="9" jid="user2@gunblues">
<body>a10</body>
</from>
<set xmlns="http://jabber.org/protocol/rsm">
<first index="0">0</first>
<last>9</last>
<count>10</count>
</set>
</chat>
</iq>
但是服务器返回了多余的结果:
<iq xmlns="jabber:client" type="result" id="2:retrieve" to="user1@gunblues/e6432422">
<chat xmlns="urn:xmpp:archive" with="room123@conference.gunblues" start="2015-01-20T06:53:01.831Z">
<from secs="0" jid="user2@gunblues">
<body>abc</body>
</from>
<from secs="0" jid="user2@gunblues">
<body>abc</body>
</from>
<from secs="0" jid="user2@gunblues">
<body>abc</body>
</from>
<from secs="1" jid="user2@gunblues">
<body>a2</body>
</from>
<from secs="1" jid="user2@gunblues">
<body>a2</body>
</from>
<from secs="1" jid="user2@gunblues">
<body>a2</body>
</from>
<from secs="2" jid="user2@gunblues">
<body>a3</body>
</from>
<from secs="2" jid="user2@gunblues">
<body>a3</body>
</from>
<from secs="2" jid="user2@gunblues">
<body>a3</body>
</from>
<from secs="3" jid="user2@gunblues">
<body>a4</body>
</from>
<from secs="3" jid="user2@gunblues">
<body>a4</body>
</from>
<from secs="3" jid="user2@gunblues">
<body>a4</body>
</from>
<set xmlns="http://jabber.org/protocol/rsm">
<first index="0">0</first>
<last>11</last>
<count>12</count>
</set>
</chat>
</iq>