diff idavoll/pubsub.py @ 58:3e2e0040e3e0

Return support for the pubsub#subscribe feature.
author Ralph Meijer <ralphm@ik.nu>
date Sat, 06 Nov 2004 16:02:32 +0000
parents 55fa890ef60b
children f6b7a06b8870
line wrap: on
line diff
--- a/idavoll/pubsub.py	Fri Nov 05 17:15:50 2004 +0000
+++ b/idavoll/pubsub.py	Sat Nov 06 16:02:32 2004 +0000
@@ -197,6 +197,14 @@
         xmlstream.addObserver(PUBSUB_UNSUBSCRIBE, self.onUnsubscribe)
         xmlstream.addObserver(PUBSUB_OPTIONS_GET, self.onOptionsGet)
         xmlstream.addObserver(PUBSUB_OPTIONS_SET, self.onOptionsSet)
+    
+    def getFeatures(self, node):
+        features = []
+
+        if not node:
+            features.append(NS_PUBSUB + "#subscribe")
+
+        return features
 
     def onSubscribe(self, iq):
         self.handler_wrapper(self._onSubscribe, iq)