I've published a PEP item:
<iq type="set" id="pub-mood"><pubsub xmlns="http://jabber.org/protocol/pubsub"><publish node="http://jabber.org/protocol/mood"><item id="current"><mood xmlns="http://jabber.org/protocol/mood"><amorous/></mood></item></publish></pubsub></iq>
got a response:
<iq from="admin@akio" type="result" to="admin@akio/akio" id="pub-mood" >
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="http://jabber.org/protocol/mood" >
<item id="current" />
</publish>
</pubsub>
</iq>
received an event notification message:
<message from="admin@akio" type="headline" to="admin@akio/akio" >
<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">
<amorous/>
</mood>
</item>
</items>
</event>
<addresses xmlns="http://jabber.org/protocol/address">
<address type="replyto" jid="admin@akio/akio" />
</addresses>
</message>
Now, retracting the item with notification (notify="1"):
<iq type="set" id="pub-mood"><pubsub xmlns="http://jabber.org/protocol/pubsub"><retract node="http://jabber.org/protocol/mood" notify="1"><item id="current"/></retract></pubsub></iq>
The server replied with success:
<iq from="admin@akio" type="result" to="admin@akio/akio" id="pub-mood" />
But no notification about item retract!
It was all right in eJabberd v2.0.5, so what's wrong with v2.1.5?!
PEP item deletion notification
To be able to retract an item, the node has to be configured with persistent items and notification of items deletion :
<iq type='set' id='config2'>
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
<configure node='http://jabber.org/protocol/mood'>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'>
<value>http://jabber.org/protocol/pubsub#node_config</value>
</field>
<field type="boolean" var="pubsub#persist_items" >
<value>1</value>
</field>
<field type="text-single" var="pubsub#max_items">
<value>10</value>
</field>
<field type="boolean" var="pubsub#notify_retract" >
<value>1</value>
</field>
</x>
</configure>
</pubsub>
</iq>
By default, PEP nodes are not configured with persistent items and items deletion notification.
And to retract an item, the 'notify' attribute is useless :
<iq type='set' id='retract1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<retract node='http://jabber.org/protocol/mood'>
<item id='current'/>
</retract>
</pubsub>
</iq>
'notify' attribute is useless?
Why 'notify' attribute is useless for item retract?7.2.2.1 Delete And Notify says that if 'notify' attribute with value 'true' or '1' present,
This violates XEP-0060, which paragraph
!
And that paragraph precedes paragraph 8.2 Configure a Node, which says about 'pubsub#notify_retract' feature. So, notify='1' MUST work regardless of 'pubsub#notify_retract' configuration setting.
You are right, the newer
You are right, the newer changes to pubsub in 2.1 introduced this, it is not the correct behavior in this case.
We have opened a bug for it, you can track it here
thanks!