[Standards-JIG] JEP 60: Entity Affiliation and Subscription modification

Peter Saint-Andre stpeter at jabber.org
Fri May 20 19:38:29 UTC 2005


On Sun, May 15, 2005 at 04:57:36PM -0700, Chris Mullins wrote:
> Section 8.2.5, Modifying Entity Affiliations
> 
> In the following case (taken from Example 95), what's being modified? 
> 
> <iq type="set"
>     from="pgm at jabber.org"
>     to="pubsub.jabber.org"
>     id="ent3">
>   <pubsub xmlns="http://jabber.org/protocol/pubsub">
>     <entities node="generic/pgm-mp3-player">
>       <entity jid="bar at baz.com"
>               affiliation="publisher"
>               subscription="none"/>
>       <entity jid="bar2 at baz.com"
>               affiliation="publisher"
>               subscription="none"/>
>       <entity jid="bar3 at baz.com"
>               affiliation="publisher"
>               subid="sub2"
>               subscription="subscribed"/>
>       <entity jid="pgm at jabber.org"
>               affiliation="outcast"
>               subscription="none"/>
>     </entities>
>   </pubsub>
> </iq>

In Example 92, the affiliations and subscriptions were:

JID             AFFILIATION   SUBSCRIPTION
pgm at jabber.org  owner         none
bar at baz.com     publisher     none
bar2 at baz.com    publisher     subscribed
bar3 at baz.com    publisher     subscribed

In Example 95, these are being changed to:

JID             AFFILIATION   SUBSCRIPTION
pgm at jabber.org  outcast       none         [error!]
bar at baz.com     publisher     none         [no change]
bar2 at baz.com    publisher     none         [subscription cancelled]
bar3 at baz.com    publisher     subscribed   [no change]

At least that is how I read it.

> If I understand right, the entity: 
> <entity jid="bar at baz.com"
>               affiliation="publisher"
>               subscription="none"/>
> 
> is creating a new affiliation, and DELETING all existing subscriptions
> this jid previously had. Is this the intended affect? Should
> subscriptions from user at server/resource also be deleted? 
> 
> If any existing subscriptions were to be left alone, it would look like:
> <entity jid="bar at baz.com" affiliation="publisher"/>
> 
> --------------
> 
> The entity
>       <entity jid="bar3 at baz.com"
>               affiliation="publisher"
>               subid="sub2"
>               subscription="subscribed"/>
> 
> is doing several things:
> It's creating an affiliation for the bar3 user as publisher. It's also
> creating a subscription with a subid of "sub2" and setting it to
> subscribed. 
> 
> 
> 
> If the user already had a "sub2" subscription, it's overwritten. All
> other subscriptions are left alone.
> 
> -------------
> 
> The entity
>       <entity jid="pgm at jabber.org"
>               affiliation="outcast"
>               subscription="none"/>
> 
> is marking the user pgm as an outcase, and deleting all subscriptions. 
> 
> -------------
> 
> 
> The entity (not from the example) 
>       <entity jid="bar3 at baz.com"
>               affiliation="publisher"
>               subscription="subscribed"/>
> 
> is illegal, as it's missing the subid attribute. 

The 'subid' attribute is OPTIONAL, so that snippet is not illegal IMHO.

/psa




More information about the Standards mailing list