lfottaviano/emesene — comment on commit 09039f844472645046d408e064a66234571b86f6
File:  line 0
By Sbte:

Also, on login, add_contact should be called, not update_contact. Weird stuff. Can you check what group they were in first? Because maybe a proper fix is changing the lines below your fix to

```
# if we are in order by status, the contact was found and now is offline/online
# delete contact from offline/online group and add to the oposite.
if self.order_by_status and found:
# y todavia no estoy en el grupo.
if offline and group_found != self.offline_group:
self.remove_contact(contact, group_found)
self.add_contact(contact, self.offline_group)

if online and group_found != self.online_group:
self.remove_contact(contact, group_found)
self.add_contact(contact, self.online_group)
```