diff src/plugins/plugin_xep_0060.py @ 310:53adec87d1d7

plugin group blog: group blog subscription
author Goffi <goffi@goffi.org>
date Mon, 11 Apr 2011 12:47:35 +0200
parents 2b52a5da0978
children f964dcec1611
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0060.py	Sat Apr 09 13:17:31 2011 +0200
+++ b/src/plugins/plugin_xep_0060.py	Mon Apr 11 12:47:35 2011 +0200
@@ -113,6 +113,10 @@
     def deleteNode(self, service, nodeIdentifier, profile_key='@DEFAULT@'):
         profile,client = self.__getClientNProfile(profile_key, 'delete node')
         return client.deleteNode(service, nodeIdentifier)
+    
+    def subscribe(self, service, nodeIdentifier, sub_jid = None, options=None, profile_key='@DEFAULT@'):
+        profile,client = self.__getClientNProfile(profile_key, 'subscribe node')
+        return client.subscribe(service, nodeIdentifier, sub_jid or client.parent.jid.userhostJID(), options=options) 
 
         
 class SatPubSubClient(pubsub.PubSubClient):