mod_pubsub_odbc -- why I get last published item twice?

Hi there,

First I config 'mod_pubsub_odbc' as the following:

[{access_createnode, pubsub_createnode},
{ignore_pep_from_offline, true},
{last_item_cache, false},
{plugins, ["flat_odbc", "hometree_odbc", "pep_odbc"]},
{max_items_node, 1000}]

Then I create a node with the following options:

max_items': '1'
notify_retract': 'false'
node_type': 'flat'
deliver_payloads': 'true'
notify_config': 'false'
notify_delete': 'false'
purge_offline': 'false'
persist_items': 'true'
subscribe': 'true'
access_model': 'open'
roster_groups_allowed': '[]'
publish_model': 'publishers'
notification_type': 'headline'
max_payload_size': '60000'
send_last_published_item': 'on_sub_and_presence'
deliver_notifications': 'true'
presence_based_delivery': 'false'

Subscribe some users and publish an item into it. When one subscriber logged in, he received the following stanza, you can see the last published item was there twice.

What's the matter here?

<body xmlns="http://jabber.org/protocol/httpbind">
     <presence xmlns="jabber:client" from="dingyawei@localhost/auto-exSvzTJ5U5" to="dingyawei@localhost/auto-exSvzTJ5U5"></presence>
    
     <presence xmlns="jabber:client" from="dingyawei@localhost/auto-9G6nw5JHNr" to="dingyawei@localhost/auto-exSvzTJ5U5">
          <delay xmlns="urn:xmpp:delay" from="dingyawei@localhost/auto-9G6nw5JHNr" stamp="2012-09-14T09:13:14Z"></delay>
          <x xmlns="jabber:x:delay" stamp="20120914T09:13:14"></x>
     </presence>

     <presence xmlns="jabber:client" from="admin@localhost/auto-OEDjK5VfF0" to="dingyawei@localhost/auto-exSvzTJ5U5">
          <delay xmlns="urn:xmpp:delay" from="admin@localhost/auto-OEDjK5VfF0" stamp="2012-09-14T08:39:51Z"></delay>
          <x xmlns="jabber:x:delay" stamp="20120914T08:39:51"></x>
     </presence>

     <message xmlns="jabber:client" from="pubsub.localhost" to="dingyawei@localhost/auto-exSvzTJ5U5">
          <event xmlns="http://jabber.org/protocol/pubsub#event">
               <items node="/home/formitems/fi170428849005597">
                    <item id="notify">
                         <entry xmlns="http://www.w3.org/2005/Atom">
                              <title>notify title</title>
                              <content>notify content</content>
                              <link>http://anzsoft.im/zgc/app201110297629/form201112070001/2012/9/14/fi170428849005597</link>
                              <published>2012/09/14 17:04:36</published>
                         </entry>
                    </item>
               </items>
          </event>
          <delay xmlns="urn:xmpp:delay" from="admin@localhost/auto-OEDjK5VfF0" stamp="2012-09-14T09:04:36Z"></delay>
     </message>

     <message xmlns="jabber:client" from="pubsub.localhost" to="dingyawei@localhost/auto-exSvzTJ5U5">
          <event xmlns="http://jabber.org/protocol/pubsub#event">
               <items node="/home/formitems/fi170428849005597">
                    <item id="notify">
                         <entry xmlns="http://www.w3.org/2005/Atom">
                              <title>notify title</title>
                              <content>notify content</content>
                              <link>http://anzsoft.im/zgc/app201110297629/form201112070001/2012/9/14/fi170428849005597</link>
                              <published>2012/09/14 17:04:36</published>
                         </entry>
                    </item>
               </items>
          </event>
          <delay xmlns="urn:xmpp:delay" from="admin@localhost/auto-OEDjK5VfF0" stamp="2012-09-14T09:04:36Z"></delay>
     </message>
</body>

best regards
eastxing

Syndicate content