summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-02-23 19:27:23 +0100
committermathieui <mathieui@mathieui.net>2015-02-24 22:46:04 +0100
commit6408c5a7478438f8b873486a0a9ea1c400072c28 (patch)
tree20a72fcab5959288ddaa8725416fefe7c8483abb
parent115fe954ac201bb47ffa8c29de8a6254705954c3 (diff)
downloadslixmpp-6408c5a7478438f8b873486a0a9ea1c400072c28.tar.gz
slixmpp-6408c5a7478438f8b873486a0a9ea1c400072c28.tar.bz2
slixmpp-6408c5a7478438f8b873486a0a9ea1c400072c28.tar.xz
slixmpp-6408c5a7478438f8b873486a0a9ea1c400072c28.zip
XEP-0115: fix a handler which expected an iq to block
-rw-r--r--slixmpp/plugins/xep_0115/caps.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/slixmpp/plugins/xep_0115/caps.py b/slixmpp/plugins/xep_0115/caps.py
index 5974699c..e7335bb5 100644
--- a/slixmpp/plugins/xep_0115/caps.py
+++ b/slixmpp/plugins/xep_0115/caps.py
@@ -15,6 +15,7 @@ from slixmpp.stanza import StreamFeatures, Presence, Iq
from slixmpp.xmlstream import register_stanza_plugin, JID
from slixmpp.xmlstream.handler import Callback
from slixmpp.xmlstream.matcher import StanzaPath
+from slixmpp import asyncio
from slixmpp.exceptions import XMPPError, IqError, IqTimeout
from slixmpp.plugins import BasePlugin
from slixmpp.plugins.xep_0115 import stanza, StaticCaps
@@ -131,6 +132,7 @@ class XEP_0115(BasePlugin):
self.xmpp.event('entity_caps', p)
+ @asyncio.coroutine
def _process_caps(self, pres):
if not pres['caps']['hash']:
log.debug("Received unsupported legacy caps: %s, %s, %s",
@@ -162,7 +164,8 @@ class XEP_0115(BasePlugin):
log.debug("New caps verification string: %s", ver)
try:
node = '%s#%s' % (pres['caps']['node'], ver)
- caps = self.xmpp['xep_0030'].get_info(pres['from'], node)
+ caps = yield from self.xmpp['xep_0030'].get_info(pres['from'], node,
+ coroutine=True)
if isinstance(caps, Iq):
caps = caps['disco_info']