continue connecting even if server doesn't support JEP49 (Private XML Storage). Fixes

This commit is contained in:
Yann Leboulanger 2006-02-02 06:57:37 +00:00
parent 96e5a18703
commit 7313d38e1a
1 changed files with 13 additions and 0 deletions
src/common

View File

@ -1499,6 +1499,17 @@ class Connection:
#TODO: implement this
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):
if answer == 'yes':
iq = iq_obj.buildReply('result')
@ -1833,6 +1844,8 @@ class Connection:
common.xmpp.NS_ROSTER)
con.RegisterHandler('iq', self._PrivateCB, 'result',
common.xmpp.NS_PRIVATE)
con.RegisterHandler('iq', self._PrivateErrorCB, 'error',
common.xmpp.NS_PRIVATE)
con.RegisterHandler('iq', self._HttpAuthCB, 'get',
common.xmpp.NS_HTTP_AUTH)
con.RegisterHandler('iq', self._gMailNewMailCB, 'set',