continue connecting even if server doesn't support JEP49 (Private XML Storage). Fixes #1499
This commit is contained in:
parent
96e5a18703
commit
7313d38e1a
|
@ -1499,6 +1499,17 @@ class Connection:
|
||||||
#TODO: implement this
|
#TODO: implement this
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def _PrivateErrorCB(self, con, iq_obj):
|
||||||
|
gajim.log.debug('PrivateErrorCB')
|
||||||
|
query = iq_obj.getTag('query')
|
||||||
|
gajim_tag = query.getTag('gajim')
|
||||||
|
if gajim_tag:
|
||||||
|
ns = gajim_tag.getNamespace()
|
||||||
|
if ns == 'gajim:metacontacts':
|
||||||
|
# Private XML Storage (JEP49) is not supported by server
|
||||||
|
# Continue connecting
|
||||||
|
self.connection.initRoster()
|
||||||
|
|
||||||
def build_http_auth_answer(self, iq_obj, answer):
|
def build_http_auth_answer(self, iq_obj, answer):
|
||||||
if answer == 'yes':
|
if answer == 'yes':
|
||||||
iq = iq_obj.buildReply('result')
|
iq = iq_obj.buildReply('result')
|
||||||
|
@ -1833,6 +1844,8 @@ class Connection:
|
||||||
common.xmpp.NS_ROSTER)
|
common.xmpp.NS_ROSTER)
|
||||||
con.RegisterHandler('iq', self._PrivateCB, 'result',
|
con.RegisterHandler('iq', self._PrivateCB, 'result',
|
||||||
common.xmpp.NS_PRIVATE)
|
common.xmpp.NS_PRIVATE)
|
||||||
|
con.RegisterHandler('iq', self._PrivateErrorCB, 'error',
|
||||||
|
common.xmpp.NS_PRIVATE)
|
||||||
con.RegisterHandler('iq', self._HttpAuthCB, 'get',
|
con.RegisterHandler('iq', self._HttpAuthCB, 'get',
|
||||||
common.xmpp.NS_HTTP_AUTH)
|
common.xmpp.NS_HTTP_AUTH)
|
||||||
con.RegisterHandler('iq', self._gMailNewMailCB, 'set',
|
con.RegisterHandler('iq', self._gMailNewMailCB, 'set',
|
||||||
|
|
Loading…
Reference in New Issue