[Mattj] Fix connection to facebook server that don't understand ver="" in roster query. Fixes #5600
This commit is contained in:
parent
708d94a310
commit
23f73004db
|
@ -636,9 +636,14 @@ class ConnectionVcard:
|
||||||
else:
|
else:
|
||||||
if iq_obj.getErrorCode() not in ('403', '406', '404'):
|
if iq_obj.getErrorCode() not in ('403', '406', '404'):
|
||||||
self.private_storage_supported = False
|
self.private_storage_supported = False
|
||||||
|
|
||||||
# We can now continue connection by requesting the roster
|
# We can now continue connection by requesting the roster
|
||||||
version = gajim.config.get_per('accounts', self.name,
|
version = None
|
||||||
|
if con.Stream.features.getTag('ver',
|
||||||
|
namespace=common.xmpp.NS_ROSTER_VER):
|
||||||
|
version = gajim.config.get_per('accounts', self.name,
|
||||||
'roster_version')
|
'roster_version')
|
||||||
|
|
||||||
iq_id = self.connection.initRoster(version=version)
|
iq_id = self.connection.initRoster(version=version)
|
||||||
self.awaiting_answers[iq_id] = (ROSTER_ARRIVED, )
|
self.awaiting_answers[iq_id] = (ROSTER_ARRIVED, )
|
||||||
elif self.awaiting_answers[id_][0] == ROSTER_ARRIVED:
|
elif self.awaiting_answers[id_][0] == ROSTER_ARRIVED:
|
||||||
|
|
|
@ -96,6 +96,7 @@ NS_PUBSUB_OWNER ='http://jabber.org/protocol/pubsub#owner'
|
||||||
NS_REGISTER ='jabber:iq:register'
|
NS_REGISTER ='jabber:iq:register'
|
||||||
NS_ROSTER ='jabber:iq:roster'
|
NS_ROSTER ='jabber:iq:roster'
|
||||||
NS_ROSTERX ='http://jabber.org/protocol/rosterx' # XEP-0144
|
NS_ROSTERX ='http://jabber.org/protocol/rosterx' # XEP-0144
|
||||||
|
NS_ROSTER_VER ='urn:xmpp:features:rosterver' # XEP-0273
|
||||||
NS_RPC ='jabber:iq:rpc' # XEP-0009
|
NS_RPC ='jabber:iq:rpc' # XEP-0009
|
||||||
NS_SASL ='urn:ietf:params:xml:ns:xmpp-sasl'
|
NS_SASL ='urn:ietf:params:xml:ns:xmpp-sasl'
|
||||||
NS_SEARCH ='jabber:iq:search'
|
NS_SEARCH ='jabber:iq:search'
|
||||||
|
|
|
@ -38,7 +38,7 @@ class NonBlockingRoster(PlugIn):
|
||||||
internal representation of contacts in roster
|
internal representation of contacts in roster
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, version=''):
|
def __init__(self, version=None):
|
||||||
"""
|
"""
|
||||||
Init internal variables
|
Init internal variables
|
||||||
"""
|
"""
|
||||||
|
@ -60,7 +60,8 @@ class NonBlockingRoster(PlugIn):
|
||||||
return
|
return
|
||||||
|
|
||||||
iq = Iq('get', NS_ROSTER)
|
iq = Iq('get', NS_ROSTER)
|
||||||
iq.setTagAttr('query', 'ver', self.version)
|
if self.version is not None:
|
||||||
|
iq.setTagAttr('query', 'ver', self.version)
|
||||||
id_ = self._owner.getAnID()
|
id_ = self._owner.getAnID()
|
||||||
iq.setID(id_)
|
iq.setID(id_)
|
||||||
self._owner.send(iq)
|
self._owner.send(iq)
|
||||||
|
|
Loading…
Reference in New Issue