powered by Jive Software

Trying to get PEP (XEP0163) running


I’m trying to get PEP (XEP0163) running with SleekXMPP 1.3.3 on an OpenFire 4.2.0 server. I think I’m sending the correct messages, but other clients still don’t receive any messages.

My clients send a presence stanza like this:
<presence xml:lang="en"><c xmlns="http://jabber.org/protocol/caps" node="http://sleekxmpp.com/ver/1.3.3" hash="sha-1" ver="fXlRiuycUrytS9+ouVyQuB4+bUA=" /></presence>

And immediately receive a disco info query from the server (in this example for user “client1”):
<iq type="get" id="180-249" to="client1@mylaptop/5b5k33kywp" from="mylaptop"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>

Which they reply to like this:
<iq type="result" id="180-249" to="mylaptop"><query xmlns="http://jabber.org/protocol/disco#info"><feature var="jabber:x:data" /><feature var="http://jabber.org/protocol/shim" /><feature var="http://jabber.org/protocol/shim#SubID" /><feature var="http://jabber.org/protocol/caps" /><identity category="client" type="bot" /><feature var="test:log+notify" /><feature var="test:log" /></query></iq>

So I’m announcing that I’m offering the feature “test:log” and want to get notified, whenever someone sends a message to that node. Am I correct so far?

Now a second client connects (“client2”) to the server and sends the same disco info. But after a few seconds, it sends a message like this:
<iq type="set" id="f77a0a39-8118-488d-a1ca-cddc44d82ac2-5"><pubsub xmlns="http://jabber.org/protocol/pubsub"><publish node="test:log"><item id="current"><log xmlns="test:log">Hello world</log></item></publish></pubsub></iq>

So it is sending to the node “test.log”. Since it also has the +notify flag set for that node, it immediately gets a response from the server:
<message to="client2@mylaptop/7fxwu49wfv" from="client2@mylaptop" id="bHB4yvrG"><event xmlns="http://jabber.org/protocol/pubsub#event"><items node="test:log"><item id="current" node="test:log"><log xmlns="test:log">Hello world</log></item></items></event><addresses xmlns="http://jabber.org/protocol/address"><address type="replyto" jid="client2@mylaptop/7fxwu49wfv" /></addresses></message>

But client1 never receives a message. What am I doing wrong? Am I misunderstanding XEP0163? Something wrong with the messages?

Okay, some update…

When client1 explicitly subscribes to client2’s PEP node, it works. That is, if client1 sends a subscription request:
<iq type="set" to="client2@mylaptop" id="7e792e29-4beb-420f-9910-5d1526cf2db6-5"><pubsub xmlns="http://jabber.org/protocol/pubsub"><subscribe node="test:log" jid="client1@mylaptop" /></pubsub></iq>
The response is an accepted subscription:
<iq type="result" id="7e792e29-4beb-420f-9910-5d1526cf2db6-5" from="client2@mylaptop" to="client1@mylaptop/7i0hrx6kzz"><pubsub xmlns="http://jabber.org/protocol/pubsub"><subscription node="test:log" jid="client1@mylaptop" subscription="subscribed"><subscribe-options /></subscription></pubsub></iq>

After this, client1 receives all messages that client2 sends to its PEP node “test:log”. But, shouldn’t this be done automatically by setting the “test:log+notify” feature?

What might be a problem is the response to a disco info query to client2. The specs for XEP-0163 state: “A PEP service MUST support the “auto-subscribe” feature defined in Section 9.1 of XEP-0060.”. But if I do a disco info request, I get lots of PEP-related stuff like this:

<identity category="pubsub" type="pep"/> <feature var="http://jabber.org/protocol/pubsub#retrieve-default"/> <feature var="http://jabber.org/protocol/pubsub#purge-nodes"/>

But NO pubsub#auto-subscribe! What I don’t understand: is this a problem with the client (SleekXMPP) or the server (OpenFire)?

At the moment I’m assuming, that it’s a server problem, so please help! Thanks

I switched from OpenFire to ejabberd, now it works fine…