summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0323/sensordata.py
diff options
context:
space:
mode:
authorJoachim Lindborg <Joachim.Lindborg@lsys.se>2013-09-04 14:57:27 +0200
committerJoachim Lindborg <Joachim.Lindborg@lsys.se>2013-09-04 14:57:27 +0200
commit8fd3781ef5de85dbec6166d079a579c1374090ec (patch)
tree8163b918ca69b3c7e7d4ce4ac69bbdfb0d8e0b64 /sleekxmpp/plugins/xep_0323/sensordata.py
parentc85f2494a83d5b28ba90740fc19e35fa85304fa6 (diff)
downloadslixmpp-8fd3781ef5de85dbec6166d079a579c1374090ec.tar.gz
slixmpp-8fd3781ef5de85dbec6166d079a579c1374090ec.tar.bz2
slixmpp-8fd3781ef5de85dbec6166d079a579c1374090ec.tar.xz
slixmpp-8fd3781ef5de85dbec6166d079a579c1374090ec.zip
added disco imformation, fixed some bugs in device
Diffstat (limited to 'sleekxmpp/plugins/xep_0323/sensordata.py')
-rw-r--r--sleekxmpp/plugins/xep_0323/sensordata.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0323/sensordata.py b/sleekxmpp/plugins/xep_0323/sensordata.py
index ff671663..2e2f2470 100644
--- a/sleekxmpp/plugins/xep_0323/sensordata.py
+++ b/sleekxmpp/plugins/xep_0323/sensordata.py
@@ -174,6 +174,12 @@ class XEP_0323(BasePlugin):
""" Return a new session ID. """
return str(time.time()) + '-' + self.xmpp.new_id()
+ def session_bind(self, jid):
+ logging.debug("setting the Disco discovery for %s" % Sensordata.namespace)
+ self.xmpp['xep_0030'].add_feature(Sensordata.namespace)
+ self.xmpp['xep_0030'].set_items(node=Sensordata.namespace, items=tuple())
+
+
def plugin_end(self):
""" Stop the XEP-0323 plugin """
self.sessions.clear();
@@ -184,7 +190,6 @@ class XEP_0323(BasePlugin):
self.xmpp.remove_handler('Sensordata Event:Cancelled')
self.xmpp.remove_handler('Sensordata Event:Fields')
self.xmpp['xep_0030'].del_feature(feature=Sensordata.namespace)
- self.xmpp['xep_0030'].set_items(node=Sensordata.namespace, items=tuple());
# =================================================================