From 5ef0b96d5c038d70fd563c18d592a4637106879b Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Wed, 28 Dec 2011 11:37:05 -0500 Subject: [PATCH] Fix caching for clients. --- sleekxmpp/plugins/xep_0030/disco.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sleekxmpp/plugins/xep_0030/disco.py b/sleekxmpp/plugins/xep_0030/disco.py index 503631ec..e1eec706 100644 --- a/sleekxmpp/plugins/xep_0030/disco.py +++ b/sleekxmpp/plugins/xep_0030/disco.py @@ -644,10 +644,14 @@ class xep_0030(base_plugin): if self.use_cache: log.debug("Caching disco info result from " \ "<%s> to <%s>.", iq['from'], iq['to']) + if self.xmpp.is_component: + ito = iq['to'].full + else: + ito = None self._run_node_handler('cache_info', iq['from'].full, iq['disco_info']['node'], - iq['to'].full, + ito, iq) self.xmpp.event('disco_info', iq)