Creating and configuring pubsub node -- pubsub#item_expire

Does 2.1.0 handle the item_expire node configuration option for automatically removing items after a certain number of seconds? It doesn't seem to have any effect when I pass the option, but hopefully I'm just doing something wrong. I really need this feature.

Thanks in advance!
Ken

Request / Response

SENT

<iq from='webapp@localhost/22864201221257472188877304' type='set' id='3676' to='pubsub.localhost' xmlns='jabber:client'>
    <pubsub xmlns='http://jabber.org/protocol/pubsub'>
        <create node='/home/localhost/pub/foo124'/>
        <configure node='/home/localhost/pub/foo124'>
            <x type='submit' xmlns='jabber:x:data'>
                <field type='hidden' var='FORM_TYPE'>
                    <value>
                        http://jabber.org/protocol/pubsub#node_config
                    </value>
                </field>
                <field var='pubsub#access_model'>
                    <value>
                        whitelist
                    </value>
                </field>
                <field var='pubsub#item_expire'>
                    <value>
                        300
                    </value>
                </field>
                <field var='pubsub#max_items'>
                    <value>
                        1
                    </value>
                </field>
            </x>
        </configure>
    </pubsub>
</iq>

RECEIVED

<configure node='/home/kadair.dyndns.org/pub/foo124'>
    <x type='form' xmlns='jabber:x:data'>
        <field type='hidden' var='FORM_TYPE' label=''>
            <value>
                http://jabber.org/protocol/pubsub#node_config
            </value>
        </field>
        <field type='boolean' var='pubsub#deliver_payloads' label='Deliver payloads with event notifications'>
            <value>
                1
            </value>
        </field>
        <field type='boolean' var='pubsub#deliver_notifications' label='Deliver event notifications'>
            <value>
                1
            </value>
        </field>
        <field type='boolean' var='pubsub#notify_config' label='Notify subscribers when the node configuration changes'>
            <value>
                0
            </value>
        </field>
        <field type='boolean' var='pubsub#notify_delete' label='Notify subscribers when the node is deleted'>
            <value>
                0
            </value>
        </field>
        <field type='boolean' var='pubsub#notify_retract' label='Notify subscribers when items are removed from the node'>
            <value>
                1
            </value>
        </field>
        <field type='boolean' var='pubsub#persist_items' label='Persist items to storage'>
            <value>
                1
            </value>
        </field>
        <field type='text-single' var='pubsub#title' label='A friendly name for the node'>
            <value/>
        </field>
        <field type='text-single' var='pubsub#max_items' label='Max # of items to persist'>
            <value>
                1
            </value>
        </field>
        <field type='boolean' var='pubsub#subscribe' label='Whether to allow subscriptions'>
            <value>
                1
            </value>
        </field>
        <field type='list-single' var='pubsub#access_model' label='Specify the access model'>
            <option>
                <value>
                    open
                </value>
            </option>
            <option>
                <value>
                    authorize
                </value>
            </option>
            <option>
                <value>
                    presence
                </value>
            </option>
            <option>
                <value>
                    roster
                </value>
            </option>
            <option>
                <value>
                    whitelist
                </value>
            </option>
            <value>
                whitelist
            </value>
        </field>
        <field type='list-multi' var='pubsub#roster_groups_allowed' label='Roster groups allowed to subscribe'/>
        <field type='list-single' var='pubsub#publish_model' label='Specify the publisher model'>
            <option>
                <value>
                    publishers
                </value>
            </option>
            <option>
                <value>
                    subscribers
                </value>
            </option>
            <option>
                <value>
                    open
                </value>
            </option>
            <value>
                publishers
            </value>
        </field>
        <field type='list-single' var='pubsub#notification_type' label='Specify the event message type'>
            <option>
                <value>
                    headline
                </value>
            </option>
            <option>
                <value>
                    normal
                </value>
            </option>
            <value>
                headline
            </value>
        </field>
        <field type='text-single' var='pubsub#max_payload_size' label='Max payload size in bytes'>
            <value>
                60000
            </value>
        </field>
        <field type='list-single' var='pubsub#send_last_published_item' label='When to send the last published item'>
            <option>
                <value>
                    never
                </value>
            </option>
            <option>
                <value>
                    on_sub
                </value>
            </option>
            <option>
                <value>
                    on_sub_and_presence
                </value>
            </option>
            <value>
                on_sub_and_presence
            </value>
        </field>
        <field type='boolean' var='pubsub#presence_based_delivery' label='Only deliver notifications to available users'>
            <value>
                0
            </value>
        </field>
        <field type='text-multi' var='pubsub#collection' label='The collections with which a node is affiliated'/>
    </x>
</configure>

Not implemented

I didn't find in mod_pubsub source code any reference to item_expire. The only similar code found refers to pubsub#expire.

Notice that the option was added to XEP-0060 very recently, and it's yet a work in progress:

Version 1.13rc6 (in progress, 2009-10-01)
 * Added item_expire node configuration option for automatically removing 
items after a certain number of seconds.

And mod_pubsub in ejabberd 2.1.0 uses version 1.12 of the specification as a base.

Syndicate content