summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0115
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-06-21 16:23:47 +0200
committermathieui <mathieui@mathieui.net>2015-06-21 16:23:47 +0200
commitf7164d35d29041790be8b9fcd77dd89f75aee789 (patch)
tree402b9eba0ea8c801c10c73318b0fc0a947343750 /slixmpp/plugins/xep_0115
parent04bff001713fa8ebcd67634048acb15caca3d8e6 (diff)
downloadslixmpp-f7164d35d29041790be8b9fcd77dd89f75aee789.tar.gz
slixmpp-f7164d35d29041790be8b9fcd77dd89f75aee789.tar.bz2
slixmpp-f7164d35d29041790be8b9fcd77dd89f75aee789.tar.xz
slixmpp-f7164d35d29041790be8b9fcd77dd89f75aee789.zip
Add a wrapper to get_info/get_items functions
(and fix caps in the process)
Diffstat (limited to 'slixmpp/plugins/xep_0115')
-rw-r--r--slixmpp/plugins/xep_0115/caps.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/slixmpp/plugins/xep_0115/caps.py b/slixmpp/plugins/xep_0115/caps.py
index e7335bb5..c6f9ea10 100644
--- a/slixmpp/plugins/xep_0115/caps.py
+++ b/slixmpp/plugins/xep_0115/caps.py
@@ -280,9 +280,10 @@ class XEP_0115(BasePlugin):
binary = hash(S.encode('utf8')).digest()
return base64.b64encode(binary).decode('utf-8')
+ @asyncio.coroutine
def update_caps(self, jid=None, node=None, preserve=False):
try:
- info = self.xmpp['xep_0030'].get_info(jid, node, local=True)
+ info = yield from self.xmpp['xep_0030'].get_info(jid, node, local=True)
if isinstance(info, Iq):
info = info['disco_info']
ver = self.generate_verstring(info, self.hash)