[ejabberd] XEP-0060: Retrive all current affiliations

Romu huruomu at gmail.com
Sun Aug 28 18:37:21 MSD 2011


Hi,

I was learning XEP-0060 (pubsub), and was testing the example stanzas
in the document with ejabberd, through xml console in psi.

According to XEP-0060, I should be able to retrieve all my
affiliations to all nodes by sending the following stanza:

<iq type='get'
    from='diablo at shakespeare.lit'
    to='pubsub.shakespeare.lit'
    id='affil1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <affiliations/>
  </pubsub>
</iq>

But the result is this:

<iq from="pubsub.shakespeare.lit" type="result"
to="diablo at shakespeare.lit/myhost" id="affil1">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<affiliations>
<affiliation affiliation="owner" node="http://jabber.org/protocol/activity"/>
<affiliation affiliation="owner" node="http://jabber.org/protocol/mood"/>
<affiliation affiliation="owner" node="212378466"/>
<affiliation affiliation="owner" node="channel_diablo"/>
</affiliations>
</pubsub>
</iq>

In the above result there are only owner affiliations.  The 'diablo'
user is subscribed to a couple of other channels, but it's not
included in the result.

Then I tried to retrieve affiliations from a specific node:

<iq type='get'
    from='diablo at shakespeare.lit'
    to='pubsub.shakespeare.lit'
    id='affil1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <affiliations node='princely_musings'/>
  </pubsub>
</iq>

But I got the same result as when I was retrieving all affiliations,
it seems that "node='...'" is ignored by ejabberd.  And if I specify a
node that does not exist, the result is the same.

Did I miss anything (ejabberd configuration?) ?  Any idea?


Thanks in advance.

Romu


More information about the ejabberd mailing list