also fix /join completion (using xep 30), and add a timeout

This commit is contained in:
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 2011-01-02 16:00:47 +00:00
parent 1135716518
commit c29cc8b15f

View file

@ -962,9 +962,9 @@ class Core(object):
if jid.resource or jid.full.endswith('/'):
# we are writing the resource: complete the node
if not the_input.last_completion:
response = self.xmpp.plugin['xep_0030'].getItems(jid.server)
response = self.xmpp.plugin['xep_0030'].get_items(jid=jid.server, block=True, timeout=1)
if response:
items = response['disco_items'].getItems()
items = response['disco_items'].get_items()
else:
return True
items = ['%s/%s' % (tup[0], jid.resource) for tup in items]