1) we can't receive our vcard empty

2) write an empty file for empty vcards so that they are not asked at each gajim startup
This commit is contained in:
Yann Leboulanger 2005-11-29 20:17:51 +00:00
parent 06a17b91e2
commit 820dae2642
1 changed files with 5 additions and 3 deletions

View File

@ -1430,10 +1430,12 @@ class Connection:
if not iq_obj.getTag('vCard'):
jid = self.awaiting_answers[id][1]
our_jid = gajim.get_jid_from_account(self.name)
if not jid or jid == our_jid:
self.dispatch('MYVCARD', {'jid': our_jid})
else:
if jid and jid != our_jid:
self.dispatch('VCARD', {'jid': jid})
# Write an empty file
path_to_file = os.path.join(gajim.VCARDPATH, jid)
fil = open(path_to_file, 'w')
fil.close()
del self.awaiting_answers[id]
def _event_dispatcher(self, realm, event, data):