[ejabberd] PEP through ejabberd_service

kael ka-el at laposte.net
Mon May 9 12:19:05 MSD 2011


On 05/06/2011 04:20 AM, Dingding Ye wrote:
> Hey, all.

Hello,

> When using PEP through ejabberd_service, I add the "To" component into
> the stanza and the process should be like: ejabberd_service ->
> ejabberd_router -> ejabberd_local. However, because mod_pubsub removed
> the "ejabberd_local" iq handler, it returns <feature-not-implemented>
> error response.
>
> Why ejabberd_local iq handler removed from mod_pubsub and what should be
> the correct way to achieve the goal? Thanks.

The recipient for publishing on PEP nodes is the JID of the publisher, 
not the JID of the ejabberd server.

This is correct :

<iq type="set" id="aac9a" to="kael at localhost">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="http://jabber.org/protocol/mood">
<item id="current">
<mood xmlns="http://jabber.org/protocol/mood">
<curious/>
</mood>
</item>
</publish>
</pubsub>
</iq>

<iq from="kael at localhost" type="result" to="kael at localhost/Psi+" id="aac9a">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="http://jabber.org/protocol/mood">
<item id="current"/>
</publish>
</pubsub>
</iq>


<message from="kael at localhost" type="headline" to="kael at localhost/Psi+">
<event xmlns="http://jabber.org/protocol/pubsub#event">
<items node="http://jabber.org/protocol/mood">
<item id="current">
<mood xmlns="http://jabber.org/protocol/mood">
<curious/>
</mood>
</item>
</items>
</event>
<addresses xmlns="http://jabber.org/protocol/address">
<address type="replyto" jid="kael at localhost/Psi+"/>
</addresses>
</message>



This is not correct :

<iq type="set" id="aac9a" to="localhost">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="http://jabber.org/protocol/mood">
<item id="current">
<mood xmlns="http://jabber.org/protocol/mood">
<curious/>
</mood>
</item>
</publish>
</pubsub>
</iq>


<iq from="localhost" type="error" xml:lang="en" to="kael at localhost/Psi+" 
id="aac9a">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="http://jabber.org/protocol/mood">
<item id="current">
<mood xmlns="http://jabber.org/protocol/mood">
<curious/>
</mood>
</item>
</publish>
</pubsub>
<error type="cancel" code="501">
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>


-- 
kael



More information about the ejabberd mailing list