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