Mercurial > libervia-pubsub
comparison idavoll/backend.py @ 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 |
comparison
equal
deleted
inserted
replaced
178:07114105885a | 179:42e23a62b57f |
---|---|
181 'node_id': node.id, | 181 'node_id': node.id, |
182 'subscriber': subscriber}, | 182 'subscriber': subscriber}, |
183 '//event/pubsub/notify') | 183 '//event/pubsub/notify') |
184 | 184 |
185 config = node.get_configuration() | 185 config = node.get_configuration() |
186 if config["pubsub#send_last_published_item"] != 'on_sub': | 186 if config.get("pubsub#send_last_published_item", 'never') != 'on_sub': |
187 return | 187 return |
188 | 188 |
189 d = self.get_items(node.id, subscriber.userhostJID(), 1) | 189 d = self.get_items(node.id, subscriber.userhostJID(), 1) |
190 d.addCallback(notify_item) | 190 d.addCallback(notify_item) |
191 | 191 |