From 8691e60a7f684cb66e898bf28eddcf4dbe314949 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Sun, 26 Jun 2011 13:17:17 +0000 Subject: Gabble: do not add ourself to the model twice OLPC #10965 We do add ourself to the model by default. When we are connected to the server it often gives us as well ourself back. This is due to a bug in the @online@ implementation in ejabberd. The first version to have this fixed is v2.1.7, more background info at https://support.process-one.net/browse/EJAB-1391. Signed-off-by: Simon Schampijer Acked-By: Sascha Silbe --- diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py index 4bb9d92..5a4c5a5 100644 --- a/src/jarabe/model/neighborhood.py +++ b/src/jarabe/model/neighborhood.py @@ -552,6 +552,11 @@ class _Account(gobject.GObject): for handle in attributes.keys(): nick = attributes[handle][CONNECTION_INTERFACE_ALIASING + '/alias'] + if handle == self._self_handle: + logging.debug('_Account.__get_contact_attributes_cb,' \ + ' do not add ourself %r', handle) + continue + if handle in self._buddy_handles and \ not self._buddy_handles[handle] is None: logging.debug('Got handle %r with nick %r, going to update', -- cgit v0.9.1