From 2265a80e9f333a118527b3a424db08dc45638166 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Wed, 11 May 2011 20:42:44 +0200
Subject: [PATCH] correctly handle roster puches with subscription=remove.
 Fixes #6829

---
 src/gui_interface.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gui_interface.py b/src/gui_interface.py
index ad48acfe35..5877a706fc 100644
--- a/src/gui_interface.py
+++ b/src/gui_interface.py
@@ -739,6 +739,10 @@ class Interface:
             #   According to xep 0162, a contact is not an observer anymore when
             #   we asked for auth, so also remove him if ask changed
             old_groups = contacts[0].groups
+            if obj.sub == 'remove':
+                # another of our instance removed a contact. Remove it here too
+                self.roster.remove_contact(obj.jid, account, backend=True)
+                return
             if contacts[0].sub != obj.sub or contacts[0].ask != obj.ask\
             or old_groups != obj.groups:
                 # c.get_shown_groups() has changed. Reflect that in
-- 
GitLab