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:
parent
06a17b91e2
commit
820dae2642
1 changed files with 5 additions and 3 deletions
|
@ -1430,10 +1430,12 @@ class Connection:
|
||||||
if not iq_obj.getTag('vCard'):
|
if not iq_obj.getTag('vCard'):
|
||||||
jid = self.awaiting_answers[id][1]
|
jid = self.awaiting_answers[id][1]
|
||||||
our_jid = gajim.get_jid_from_account(self.name)
|
our_jid = gajim.get_jid_from_account(self.name)
|
||||||
if not jid or jid == our_jid:
|
if jid and jid != our_jid:
|
||||||
self.dispatch('MYVCARD', {'jid': our_jid})
|
|
||||||
else:
|
|
||||||
self.dispatch('VCARD', {'jid': 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]
|
del self.awaiting_answers[id]
|
||||||
|
|
||||||
def _event_dispatcher(self, realm, event, data):
|
def _event_dispatcher(self, realm, event, data):
|
||||||
|
|
Loading…
Add table
Reference in a new issue