plulgin XEP-0115: fixed caps_optimize init

This commit is contained in:
Goffi 2014-03-31 16:57:02 +02:00
commit a8d12fb6de

View file

@ -61,10 +61,12 @@ class XEP_0115(object):
return XEP_0115_handler(self, profile)
def _checkHash(self, disco_d, profile):
client = self.host.getClient(profile)
client.caps_optimize = None
if XEP_0115.cap_hash is None:
disco_d.addCallback(lambda dummy: self.host.hasFeature(NS_CAPS_OPTIMIZE, profile_key=profile))
def updateOptimize(optimize):
client = self.host.getClient(profile)
client.caps_optimize = optimize
if optimize:
info(_("Caps optimisation enabled"))