parent
a91f5f2c49
commit
633795b7f4
1 changed files with 10 additions and 4 deletions
|
@ -226,10 +226,16 @@ class MUC:
|
||||||
# handled by the opened ChatControl
|
# handled by the opened ChatControl
|
||||||
break
|
break
|
||||||
|
|
||||||
# We remove the contact from the MUC, but there could be
|
if contact is None:
|
||||||
# a PrivateChatControl open, so we update the contacts presence
|
# If contact is None, its probably that a user left from a not
|
||||||
contact.presence = properties.type
|
# insync MUC, can happen on older servers
|
||||||
app.contacts.remove_gc_contact(self._account, contact)
|
log.warning('Unknown contact left groupchat: %s',
|
||||||
|
properties.jid)
|
||||||
|
else:
|
||||||
|
# We remove the contact from the MUC, but there could be
|
||||||
|
# a PrivateChatControl open, so we update the contacts presence
|
||||||
|
contact.presence = properties.type
|
||||||
|
app.contacts.remove_gc_contact(self._account, contact)
|
||||||
log.info('User %s left', properties.jid)
|
log.info('User %s left', properties.jid)
|
||||||
self._raise_muc_event('muc-user-left', properties)
|
self._raise_muc_event('muc-user-left', properties)
|
||||||
raise nbxmpp.NodeProcessed
|
raise nbxmpp.NodeProcessed
|
||||||
|
|
Loading…
Add table
Reference in a new issue