summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0030/disco.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-09-28 11:02:57 -0700
committerLance Stout <lancestout@gmail.com>2012-09-28 11:02:57 -0700
commita2c60a4911c64a8b40c39dfb9d74ed0eaed0e9b3 (patch)
tree40d99fd4b547e4f81e2c9c2b29682c6bb7ac7a06 /sleekxmpp/plugins/xep_0030/disco.py
parent73ce9a5eccb5fea6f9a6dd72410cdada2a43347f (diff)
parentee9c4abd08db06fd6dc808d48c43cd6d57bd1aa1 (diff)
downloadslixmpp-a2c60a4911c64a8b40c39dfb9d74ed0eaed0e9b3.tar.gz
slixmpp-a2c60a4911c64a8b40c39dfb9d74ed0eaed0e9b3.tar.bz2
slixmpp-a2c60a4911c64a8b40c39dfb9d74ed0eaed0e9b3.tar.xz
slixmpp-a2c60a4911c64a8b40c39dfb9d74ed0eaed0e9b3.zip
Merge branch 'master' into develop
Diffstat (limited to 'sleekxmpp/plugins/xep_0030/disco.py')
-rw-r--r--sleekxmpp/plugins/xep_0030/disco.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/sleekxmpp/plugins/xep_0030/disco.py b/sleekxmpp/plugins/xep_0030/disco.py
index be66b6fd..278b4a34 100644
--- a/sleekxmpp/plugins/xep_0030/disco.py
+++ b/sleekxmpp/plugins/xep_0030/disco.py
@@ -288,7 +288,7 @@ class XEP_0030(BasePlugin):
'cached': cached}
return self.api['has_identity'](jid, node, ifrom, data)
- def get_info(self, jid=None, node=None, local=False,
+ def get_info(self, jid=None, node=None, local=None,
cached=None, **kwargs):
"""
Retrieve the disco#info results from a given JID/node combination.
@@ -325,17 +325,18 @@ class XEP_0030(BasePlugin):
received instead of blocking and waiting for
the reply.
"""
- if jid is not None and not isinstance(jid, JID):
- jid = JID(jid)
- if self.xmpp.is_component:
- if jid.domain == self.xmpp.boundjid.domain:
- local = True
- else:
- if str(jid) == str(self.xmpp.boundjid):
- local = True
- jid = jid.full
- elif jid in (None, ''):
- local = True
+ if local is None:
+ if jid is not None and not isinstance(jid, JID):
+ jid = JID(jid)
+ if self.xmpp.is_component:
+ if jid.domain == self.xmpp.boundjid.domain:
+ local = True
+ else:
+ if str(jid) == str(self.xmpp.boundjid):
+ local = True
+ jid = jid.full
+ elif jid in (None, ''):
+ local = True
if local:
log.debug("Looking up local disco#info data " + \
@@ -405,7 +406,7 @@ class XEP_0030(BasePlugin):
the XEP-0059 plugin, if the plugin is loaded.
Otherwise the parameter is ignored.
"""
- if local or jid is None:
+ if local or local is None and jid is None:
items = self.api['get_items'](jid, node,
kwargs.get('ifrom', None),
kwargs)