Mercurial > libervia-pubsub
changeset 179:42e23a62b57f
Guard against missing config for sending last published item on subscription.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Thu, 10 Apr 2008 14:06:00 +0000 |
parents | 07114105885a |
children | fc687620599b |
files | idavoll/backend.py idavoll/memory_storage.py |
diffstat | 2 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/idavoll/backend.py Thu Apr 10 14:02:53 2008 +0000 +++ b/idavoll/backend.py Thu Apr 10 14:06:00 2008 +0000 @@ -183,7 +183,7 @@ '//event/pubsub/notify') config = node.get_configuration() - if config["pubsub#send_last_published_item"] != 'on_sub': + if config.get("pubsub#send_last_published_item", 'never') != 'on_sub': return d = self.get_items(node.id, subscriber.userhostJID(), 1)
--- a/idavoll/memory_storage.py Thu Apr 10 14:02:53 2008 +0000 +++ b/idavoll/memory_storage.py Thu Apr 10 14:06:00 2008 +0000 @@ -10,6 +10,7 @@ default_config = {"pubsub#persist_items": True, "pubsub#deliver_payloads": True, + "pubsub#send_last_published_item": True, "pubsub#node_type": "leaf"} class Storage: