Mercurial > libervia-pubsub
comparison idavoll/pubsub.py @ 25:256dcda26752
Bugfix: use 'event' element instead of 'x' for notifications.
Changed adapter registration to reflect name change of backend.IService.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Sun, 17 Oct 2004 13:53:01 +0000 |
parents | 884268687229 |
children | fa866793075d |
comparison
equal
deleted
inserted
replaced
24:4f3bbefc6fad | 25:256dcda26752 |
---|---|
206 | 206 |
207 def notify(self, node, itemlist, recipient): | 207 def notify(self, node, itemlist, recipient): |
208 message = domish.Element((NS_COMPONENT, "message")) | 208 message = domish.Element((NS_COMPONENT, "message")) |
209 message["from"] = self.parent.jabberId | 209 message["from"] = self.parent.jabberId |
210 message["to"] = recipient | 210 message["to"] = recipient |
211 x = message.addElement((NS_PUBSUB_EVENT, "x"), NS_PUBSUB_EVENT) | 211 event = message.addElement((NS_PUBSUB_EVENT, "event"), NS_PUBSUB_EVENT) |
212 items = x.addElement("items") | 212 items = event.addElement("items") |
213 items["node"] = node | 213 items["node"] = node |
214 items.children.extend(itemlist) | 214 items.children.extend(itemlist) |
215 self.send(message) | 215 self.send(message) |
216 | 216 |
217 components.registerAdapter(ComponentServiceFromBackend, backend.IBackendService, component.IService) | 217 components.registerAdapter(ComponentServiceFromBackend, backend.IService, component.IService) |
218 | 218 |