the time we look at what is sent by the ROSTER event, xmpp added a new entry, we don't want it: this entry is in 'Not in roster' group

This commit is contained in:
Yann Leboulanger 2005-10-11 15:39:51 +00:00
parent 2840838b7f
commit d8e4c0b0e1
1 changed files with 4 additions and 9 deletions

View File

@ -1186,14 +1186,15 @@ class Connection:
def _getRosterCB(self, con, iq_obj):
if not self.connection:
return
roster = self.connection.getRoster().getRaw()
roster = self.connection.getRoster().getRaw().copy()
if not roster:
roster = {}
jid = gajim.get_jid_from_account(self.name)
if roster.has_key(jid):
del roster[jid]
self.dispatch('ROSTER', roster)
# continue connection
@ -1507,12 +1508,6 @@ class Connection:
self.connection.disconnect()
return
def ask_roster(self):
roster = {}
if self.connection:
roster = self.connection.getRoster().getRaw()
return roster
def build_privacy_rule(self, name, action):
'''Build a Privacy rule stanza for invisibility'''
iq = common.xmpp.Iq('set', common.xmpp.NS_PRIVACY, xmlns = '')