Skip to content
Snippets Groups Projects
Commit 23f73004 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

[Mattj] Fix connection to facebook server that don't understand ver="" in roster query. Fixes #5600

parent 708d94a3
No related branches found
No related tags found
No related merge requests found
......@@ -636,9 +636,14 @@ class ConnectionVcard:
else:
if iq_obj.getErrorCode() not in ('403', '406', '404'):
self.private_storage_supported = False
# 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')
iq_id = self.connection.initRoster(version=version)
self.awaiting_answers[iq_id] = (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_ROSTER ='jabber:iq:roster'
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_SASL ='urn:ietf:params:xml:ns:xmpp-sasl'
NS_SEARCH ='jabber:iq:search'
......
......@@ -38,7 +38,7 @@ class NonBlockingRoster(PlugIn):
internal representation of contacts in roster
"""
def __init__(self, version=''):
def __init__(self, version=None):
"""
Init internal variables
"""
......@@ -60,7 +60,8 @@ class NonBlockingRoster(PlugIn):
return
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()
iq.setID(id_)
self._owner.send(iq)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment