plugin android: fixed csi_timer reset in setActive + crash on call of isActive before session initialisation
This commit is contained in:
parent
47bd1495df
commit
7faaa9691b
1 changed files with 10 additions and 2 deletions
|
|
@ -47,9 +47,16 @@ class XEP_0352(object):
|
|||
host.registerNamespace(u"csi", NS_CSI)
|
||||
|
||||
def isActive(self, client):
|
||||
if not client._xep_0352_enabled:
|
||||
try:
|
||||
if not client._xep_0352_enabled:
|
||||
return True
|
||||
return client._xep_0352_active
|
||||
except AttributeError:
|
||||
# _xep_0352_active can not be set if isActive is called before
|
||||
# profileConnected has been called
|
||||
log.debug(u"isActive called when XEP-0352 plugin has not yet set the "
|
||||
u"attributes")
|
||||
return True
|
||||
return client._xep_0352_active
|
||||
|
||||
def profileConnected(self, client):
|
||||
if (NS_CSI, u'csi') in client.xmlstream.features:
|
||||
|
|
|
|||
Loading…
Reference in a new issue