[ejabberd] PEP through ejabberd_service

kael ka-el at laposte.net
Mon May 9 13:45:42 MSD 2011


On 05/09/2011 11:24 AM, Dingding Ye wrote:
>
> 1. According to PEP's proposal, there should be no "to" address in the
> stanzas.
>
> 2. We should set the 'to' address to the component name of the external
> component.
>
> So is that mean for PEP through sjabberd_service, the component name
> should be the full jid of each publisher?  Thanks.

Publishing with no 'to' address is the same than publishing with the 
publisher JID as recipient. In both cases, it is related to 
Pubsub-On-Jid, PEP being a profile of a Pubsub-On-Jid service. - cf. 
<http://xmpp.org/extensions/xep-0060.html#presence>.


These stanzas are equivalent and are to be handled as PEP :

<iq type="set" id="aac9a" from="kael at localhost/Psi+">
<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 type="set" id="aac9a" to="kael at localhost" from="kael at localhost/Psi+">
<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>



To post on a Pubsub service, the stanza looks like :

<iq type="set" id="aac9a" to="pubsub.localhost" from="kael at localhost/Psi+">
<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>


-- 
kael



More information about the ejabberd mailing list