Fix issues of disco info leaking between entities with the same bare JIDs.

To ensure that disco info, or any settings which depend on the bound
JID, are correct, only set such information on or after the
session_bound event has fired.
This commit is contained in:
Lance Stout
2012-07-09 22:22:05 -07:00
parent 7d20f0e9a6
commit 1baae1b81e
4 changed files with 10 additions and 20 deletions

View File

@@ -78,11 +78,12 @@ class XEP_0115(BasePlugin):
disco = self.xmpp['xep_0030']
self.static = StaticCaps(self.xmpp, disco.static)
self.api.settings['client_bare'] = False
self.api.settings['component_bare'] = False
for op in self._disco_ops:
self.api.register(getattr(self.static, op), op, default=True)
for op in ('supports', 'has_identity'):
self.xmpp['xep_0030'].api.register(getattr(self.static, op), op)
self._run_node_handler = disco._run_node_handler
disco.cache_caps = self.cache_caps