On Monday 10 January 2011 04:08:23 Dave Cridland wrote:
> 1) A minor niggle - I hate using "query" as the <iq/> element. Feels
> very old-fashioned. :-)

And what would you pick? :)

> 2) Delegations may need to include a node.

Good idea.

> 3) The "type" attribute used feels highly underspecified. I suspect
> something with a couple of levels of heirarchy, similar to (and
> possibly the same as) the disco <identity/> category and type.
> Equally, it needs a registry defined, and a human-readable string
> wouldn't hurt, so maybe the best option would be to simply use the
> same <identity/> element and have done with it.
>
> 4) Conceptually, this feels similar to disco#items anyway. We can't
> use disco#items directly, though, because we can't include the
> purpose in the items listing, which is unfortunate - I do wonder if
> we could include a child element of <item/> there to include that
> information, though. It could prove useful in other cases:
> 
> <iq from='[email protected]' type='result' id='foo'>
> <query xmlns='http://jabber.org/protocol/disco#items'
> xmlns:x='urn:xmpp:tmp:delegation'>
> <item jid='[email protected]' name='Work account'>
>   <x:delegation category='account' type='registered' purpose='work'/>
>   <!-- This item is a delegation to indicate my work account -->
> </item>
> </query>
> </iq>
> 
> Or even:
> 
> <iq from='dave.cridland.net' type='result' id='bar'>
> <query xmlns='http://jabber.org/protocol/disco#items'
> xmlns:x='urn:xmpp:tmp:delegation'>
> <item jid='chat.dave.cridland.net' name='Work account'>
>   <x:delegation category='account' type='registered'
> purpose='continue'/>
>   <!-- This MUC service should be used for
> http://xmpp.org/extensions/xep-0045.html#continue -->
> </item>
> </query>
> </iq>
> 
> Note I'm not using <identity/> in this suggestion because - of course
> - it won't fit. I assume the existence of a purpose registry, to
> indicate some kind of purpose of the entity from the perspective of
> the queried entity.

Yes, I think having a purpose or context is important, as I wrote in my other 
mail.

I am partial to David Ammouial's suggestion of using redirects as opposed to 
querying for a list.  We'd need a way to include purpose in the request 
though, so we can't literally send a normal stanza to trigger this.  Rather, 
we'd perform a special query for the type+purpose and get a response jid+node 
(and probably we should use a success response to deliver that, rather than 
use <redirect/>).

If we're not querying for lists, then disco#items is out.  But, we can still 
inherit disco category and type.

How about this:

<iq type="get" from="[email protected]/home" to="[email protected]" id="d1">
  <query xmlns="urn:xmpp:tmp:delegation" category="pubsub" type="service" 
purpose="microblog"/>
</iq>

<iq type="result" from="[email protected]" to="[email protected]/home" id="d1">
  <query xmlns="urn:xmpp:tmp:delegation">
    <service jid="pubsub.example.com" node="urn:xmpp:microblog:0"/>
  </query>
</iq>

Justin

Reply via email to