Sergei Golovan wrote: > Looking at section 5.5 of XEP-0060 > (http://www.xmpp.org/extensions/xep-0060.html#entity-discoveritems) I > see that disco#items query is used for retrieving published items > list. > > However, published items are very different from disco#items. If a > naive client attempts to interpret published item as an ordinary disco > item it will succeed but the result will be quite strange.
True, but why would a naive client send this kind of request in the first place? > Example: > > <iq id='21' to='[EMAIL PROTECTED]' type='get' xml:lang='en'> > <query xmlns='http://jabber.org/protocol/disco#items' > node='http://jabber.org/protocol/mood'/> > </iq> > > <iq from='[EMAIL PROTECTED]' id='21' type='result' to='[EMAIL > PROTECTED]/resource'> > <query node='http://jabber.org/protocol/mood' > xmlns='http://jabber.org/protocol/disco#items'> > <item name='mood1' jid='[EMAIL PROTECTED]'/> > <item name='mood2' jid='[EMAIL PROTECTED]'/> > </query> > </iq> > > A client will interpret the answer as if JID "[EMAIL PROTECTED]" have a > natural > name (as in XEP-0030) "mood1" or "mood2". > > To be able to process items list correctly two conditions must be met: > 1) A client must support pubsub. > 2) A client must know that a discovered node is a pubsub leaf node > (so, it must perform a preliminary disco#info query) and its > interpretation of disco#items query must depend on the context (which > makes client development more complicated). I think a client would drill down this far only if it knew that the mood node was pubsub-related. > Is there any valid reason why disco#items query is used for requesting > published items (except that both are items)? Maybe it would be better > to switch to some more appropriate custom protocol? Despite what I typed above, I think you make a good point. Notice that we do something similar in the language translation protocol (XEP-0171). Perhaps some input from client developers would be useful here... Peter -- Peter Saint-Andre https://stpeter.im/
smime.p7s
Description: S/MIME Cryptographic Signature
