changeset 122:8527bce09862

Changed to adapt to new API of backend's add_subscription.
author Ralph Meijer <ralphm@ik.nu>
date Tue, 12 Apr 2005 12:27:17 +0000
parents 4f0113adb7ed
children 8f99b4f7aea2
files idavoll/pubsub.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/idavoll/pubsub.py	Tue Apr 12 12:26:05 2005 +0000
+++ b/idavoll/pubsub.py	Tue Apr 12 12:27:17 2005 +0000
@@ -268,14 +268,14 @@
 
         requestor = jid.JID(iq["from"]).userhostJID()
         d = self.backend.subscribe(node_id, subscriber, requestor)
-        d.addCallback(self.return_subscription)
+        d.addCallback(self.return_subscription, subscriber)
         return d
 
-    def return_subscription(self, result):
+    def return_subscription(self, result, subscriber):
         reply = domish.Element((NS_PUBSUB, "pubsub"))
         entity = reply.addElement("entity")
         entity["node"] = result["node"]
-        entity["jid"] = result["jid"].full()
+        entity["jid"] = subscriber.full()
         entity["affiliation"] = result["affiliation"] or 'none'
         entity["subscription"] = result["subscription"]
         return [reply]