Submitted by Paolo Nesti Poggi (not verified) on 27 November, 2008 - 16:23.
Thank you for this module it's great to have the chat history in a database.
I'm working at a web client that will be release as gpl and I'm currently struggling with a feature that cannot make work as stated in XEP-136. Honestly I'm not sure if it's me doing or expecting something wrong or if actually there is this discrepancy:
When I list chats I can retrieve them without specifying a resource identifier in the with attribute, and ejabberd will return all chats with that JID.
This goes even if I use the exactmatch="1"
The server answer will be:
<iq xmlns='jabber:client' from='paolo@example.com' to='paolo@example.com/__ponderaid__app__713' id='get_chat' type='error'>
<retrieve xmlns='http://www.xmpp.org/extensions/xep-0136.html#ns' exactmatch='0' with='jeff@example.com' start='2008-11-27T11:52:52.000000Z'>
<set xmlns='http://jabber.org/protocol/rsm'/>
</retrieve><error code='404' type='cancel'>
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error></iq>
unless I use the JID as with="jeff@example.com/__ponderaid__app__"
Now this is different from how I read xep-0136 in may respects. Is this possibly the expected behaviour? And do you kow if there is something I can do to avoid specifying the resource in my query for a single chat?
exact match in list and retrieve
Thank you for this module it's great to have the chat history in a database.
I'm working at a web client that will be release as gpl and I'm currently struggling with a feature that cannot make work as stated in XEP-136. Honestly I'm not sure if it's me doing or expecting something wrong or if actually there is this discrepancy:
When I list chats I can retrieve them without specifying a resource identifier in the with attribute, and ejabberd will return all chats with that JID.
This goes even if I use the exactmatch="1"
The query:
<iq xmlns="jabber:client" type="get" id="get_chats">
<list xmlns="http://www.xmpp.org/extensions/xep-0136.html#ns" with="jeff@example.com" start="2008-01-01T00:00:00.000000Z"><set xmlns="http://jabber.org/protocol/rsm"><max xmlns="">100</max>
</set></list></iq>
will give me:
<iq xmlns='jabber:client' from='paolo@example.com' to='paolo@example.com/__ponderaid__app__' id='get_chats' type='result'>
<list xmlns='http://www.xmpp.org/extensions/xep-0136.html#ns'>
...
<chat with='jeff@example.com' start='2008-11-26T11:07:00.000000Z'/>
<chat with='jeff@example.com' start='2008-11-27T00:25:50.000000Z'/>
<chat with='jeff@example.com/__ponderaid__app__498' start='2008-11-27T09:51:02.000000Z'/>
<chat with='jeff@example.com/__ponderaid__app__' start='2008-11-27T11:33:36.000000Z'/>
<chat with='jeff@example.com/__ponderaid__app__' start='2008-11-27T11:52:52.000000Z'/>
<set xmlns='http://jabber.org/protocol/rsm'>
<first index='0'>63393645860@65</first>
<last>63395005972@231</last>
<changed>2008-11-27T11:53:03.000000Z</changed>
<count>11</count></set></list></iq>
This is actually not a problem to me as it is the behaviour I need.
However when I try and retrieve one chat from the list, I cannot retrieve it unless I specify the resource identifier in the 'with' attribute.
If I do:
<iq xmlns="jabber:client" type="get" id="get_chat">
<retrieve xmlns="http://www.xmpp.org/extensions/xep-0136.html#ns" exactmatch="0" with="jeff@example.com" start="2008-11-27T11:52:52.000000Z">
<set xmlns="http://jabber.org/protocol/rsm"/>
</retrieve></iq>
I won't get the last chat on the list above.
The server answer will be:
<iq xmlns='jabber:client' from='paolo@example.com' to='paolo@example.com/__ponderaid__app__713' id='get_chat' type='error'>
<retrieve xmlns='http://www.xmpp.org/extensions/xep-0136.html#ns' exactmatch='0' with='jeff@example.com' start='2008-11-27T11:52:52.000000Z'>
<set xmlns='http://jabber.org/protocol/rsm'/>
</retrieve><error code='404' type='cancel'>
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error></iq>
unless I use the JID as with="jeff@example.com/__ponderaid__app__"
Now this is different from how I read xep-0136 in may respects. Is this possibly the expected behaviour? And do you kow if there is something I can do to avoid specifying the resource in my query for a single chat?
Tia, Paolo