fix some tracebacks when adding / removing a contact. Fixes #5946
This commit is contained in:
parent
efb7f243f4
commit
0f2ddd50c4
|
@ -1773,7 +1773,8 @@ ConnectionJingle, ConnectionIBBytestream):
|
||||||
break
|
break
|
||||||
|
|
||||||
if obj.contact:
|
if obj.contact:
|
||||||
obj.old_show = statuss.index(obj.contact.show)
|
if obj.contact.show in statuss:
|
||||||
|
obj.old_show = statuss.index(obj.contact.show)
|
||||||
# nick changed
|
# nick changed
|
||||||
if obj.contact_nickname is not None and \
|
if obj.contact_nickname is not None and \
|
||||||
obj.contact.contact_name != obj.contact_nickname:
|
obj.contact.contact_name != obj.contact_nickname:
|
||||||
|
@ -1800,7 +1801,7 @@ ConnectionJingle, ConnectionIBBytestream):
|
||||||
resource=obj.resource)
|
resource=obj.resource)
|
||||||
gajim.contacts.add_contact(account, obj.contact)
|
gajim.contacts.add_contact(account, obj.contact)
|
||||||
obj.contact_list.append(obj.contact)
|
obj.contact_list.append(obj.contact)
|
||||||
else:
|
elif obj.contact.show in statuss:
|
||||||
obj.old_show = statuss.index(obj.contact.show)
|
obj.old_show = statuss.index(obj.contact.show)
|
||||||
if (resources != [''] and (len(obj.contact_list) != 1 or \
|
if (resources != [''] and (len(obj.contact_list) != 1 or \
|
||||||
obj.contact_list[0].show != 'offline')) and \
|
obj.contact_list[0].show != 'offline')) and \
|
||||||
|
|
|
@ -772,7 +772,7 @@ class PresenceReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
|
||||||
gajim.config.set_per('account', self.conn.name,
|
gajim.config.set_per('account', self.conn.name,
|
||||||
'dont_ack_subscription', True)
|
'dont_ack_subscription', True)
|
||||||
else:
|
else:
|
||||||
self.dispatch('UNSUBSCRIBED', self.jid)
|
self.conn.dispatch('UNSUBSCRIBED', self.jid)
|
||||||
elif self.ptype == 'error':
|
elif self.ptype == 'error':
|
||||||
errmsg = self.iq_obj.getError()
|
errmsg = self.iq_obj.getError()
|
||||||
errcode = self.iq_obj.getErrorCode()
|
errcode = self.iq_obj.getErrorCode()
|
||||||
|
|
Loading…
Reference in New Issue