correctly detect vcard support of server. Fixes #5233
This commit is contained in:
parent
3a09185cb9
commit
54fa89af23
|
@ -187,7 +187,7 @@ class Connection(ConnectionHandlers):
|
|||
self.muc_jid = {} # jid of muc server for each transport type
|
||||
self.available_transports = {} # list of available transports on this
|
||||
# server {'icq': ['icq.server.com', 'icq2.server.com'], }
|
||||
self.vcard_supported = True
|
||||
self.vcard_supported = False
|
||||
self.private_storage_supported = True
|
||||
self.streamError = ''
|
||||
# END __init__
|
||||
|
|
|
@ -897,6 +897,8 @@ class ConnectionDisco:
|
|||
gajim.interface.roster.music_track_changed(listener,
|
||||
track, self.name)
|
||||
break
|
||||
if features.__contains__(common.xmpp.NS_VCARD):
|
||||
self.vard_supported = True
|
||||
if features.__contains__(common.xmpp.NS_PUBSUB):
|
||||
self.pubsub_supported = True
|
||||
if features.__contains__(common.xmpp.NS_PUBSUB_PUBLISH_OPTIONS):
|
||||
|
@ -1136,10 +1138,6 @@ class ConnectionVcard:
|
|||
# We do as if it comes from the fake_jid
|
||||
frm = groupchat_jid
|
||||
our_jid = gajim.get_jid_from_account(self.name)
|
||||
if iq_obj.getType() == 'error' and jid == our_jid:
|
||||
# our server doesn't support vcard
|
||||
log.debug('xxx error xxx')
|
||||
self.vcard_supported = False
|
||||
if not iq_obj.getTag('vCard') or iq_obj.getType() == 'error':
|
||||
if frm and frm != our_jid:
|
||||
# Write an empty file
|
||||
|
@ -2638,6 +2636,7 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
|||
self.connection.send(p)
|
||||
self.priority = priority
|
||||
self.dispatch('STATUS', show)
|
||||
if self.vcard_supported:
|
||||
# ask our VCard
|
||||
self.request_vcard(None)
|
||||
|
||||
|
|
Loading…
Reference in New Issue