summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0030/static.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-12-28 11:46:13 -0500
committerLance Stout <lancestout@gmail.com>2011-12-28 11:46:13 -0500
commit4df1641689da53e3f9c2e49ee3f0e5e92a7c4d06 (patch)
treeb5249cdac2ae8752a569a862c52a17537968b834 /sleekxmpp/plugins/xep_0030/static.py
parent5ef0b96d5c038d70fd563c18d592a4637106879b (diff)
downloadslixmpp-4df1641689da53e3f9c2e49ee3f0e5e92a7c4d06.tar.gz
slixmpp-4df1641689da53e3f9c2e49ee3f0e5e92a7c4d06.tar.bz2
slixmpp-4df1641689da53e3f9c2e49ee3f0e5e92a7c4d06.tar.xz
slixmpp-4df1641689da53e3f9c2e49ee3f0e5e92a7c4d06.zip
Add set_info disco handler.
Diffstat (limited to 'sleekxmpp/plugins/xep_0030/static.py')
-rw-r--r--sleekxmpp/plugins/xep_0030/static.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/sleekxmpp/plugins/xep_0030/static.py b/sleekxmpp/plugins/xep_0030/static.py
index 09ce6850..d48b5649 100644
--- a/sleekxmpp/plugins/xep_0030/static.py
+++ b/sleekxmpp/plugins/xep_0030/static.py
@@ -134,7 +134,17 @@ class StaticDisco(object):
else:
return self.get_node(jid, node)['info']
- def del_info(self, jid, node, data):
+ def set_info(self, jid, node, ifrom, data):
+ """
+ Set the entire info stanza for a JID/node at once.
+
+ The data parameter is a disco#info substanza.
+ """
+ with self.lock:
+ self.add_node(jid, node)
+ self.get_node(jid, node)['info'] = data
+
+ def del_info(self, jid, node, ifrom, data):
"""
Reset the info stanza for a given JID/node combination.
@@ -163,7 +173,7 @@ class StaticDisco(object):
"""
Replace the stored items data for a JID/node combination.
- The data parameter may provided:
+ The data parameter may provide:
items -- A set of items in tuple format.
"""
with self.lock: