powered by Jive Software

Incorrect response to PubSub request for the current affiliation for a node

Hi,

I am requesting the affiliation for a pubsub node (using Smack) for the currently connected user. This is done by a request similar to shown in XEP-60 example 30: XEP-0060: Publish-Subscribe.

What I expect to be returned is the affiliation of the current user, instead the affiliations of the current user for all nodes are returned.

Furthermore, the returned affiliations contain both the node and the jid attribute, this is not correct according to XEP-60, which dictates that only the node attribute should be present. Smack is pretty strict about this, and refuses to parse affiliation elements with both attributes set.

The send request:

<iq to='pubsub.orphu' id='HI6M2-80' type='get'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <affiliations node='fdp/submitted/share_location'/>
  </pubsub>
</iq>

The received response:

<iq type="result" id="HI6M2-80" from="pubsub.orphu" to="noman@orphu/2hqjb8sd8j">
  <pubsub xmlns="http://jabber.org/protocol/pubsub">
    <affiliations node="fdp/submitted/share_location">
      <affiliation node="xmpp:gwb:0:freshstart@conference.orphu" jid="noman@orphu" affiliation="owner"/>
      <affiliation node="xmpp:gwb:0:muc:conference.orphu:testasdf" jid="noman@orphu" affiliation="owner"/>
      <affiliation node="xmpp:gwb:0:muc:conference.orphu:safdfa" jid="noman@orphu" affiliation="owner"/>
      <affiliation node="xmpp:gwb:0:tesafdsaf@conference.orphu" jid="noman@orphu" affiliation="none"/>
      <affiliation node="xmpp:gwb:0:sdafsadfsad@conference.orphu" jid="noman@orphu" affiliation="owner"/>
      <affiliation node="xmpp:gwb:0:muc:conference.orphu:sdafsadfsad" jid="noman@orphu" affiliation="owner"/>
      <affiliation node="xmpp:gwb:0:muc:conference.orphu:freshstart" jid="noman@orphu" affiliation="owner"/>
      <affiliation node="xmpp:gwb:0:muc:conference.orphu:tesafdsaf" jid="noman@orphu" affiliation="owner"/>
      <affiliation node="xmpp:gwb:0:safdfa@conference.orphu" jid="noman@orphu" affiliation="owner"/>
      <affiliation node="xmpp:gwb:0:testasdf@conference.orphu" jid="noman@orphu" affiliation="owner"/>
    </affiliations>
  </pubsub>
</iq>

Kind regards,
Frank Matheron