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:
parent
2840838b7f
commit
d8e4c0b0e1
|
@ -1186,14 +1186,15 @@ class Connection:
|
||||||
def _getRosterCB(self, con, iq_obj):
|
def _getRosterCB(self, con, iq_obj):
|
||||||
if not self.connection:
|
if not self.connection:
|
||||||
return
|
return
|
||||||
roster = self.connection.getRoster().getRaw()
|
roster = self.connection.getRoster().getRaw().copy()
|
||||||
if not roster:
|
if not roster:
|
||||||
roster = {}
|
roster = {}
|
||||||
|
|
||||||
jid = gajim.get_jid_from_account(self.name)
|
jid = gajim.get_jid_from_account(self.name)
|
||||||
|
|
||||||
if roster.has_key(jid):
|
if roster.has_key(jid):
|
||||||
del roster[jid]
|
del roster[jid]
|
||||||
|
|
||||||
self.dispatch('ROSTER', roster)
|
self.dispatch('ROSTER', roster)
|
||||||
|
|
||||||
# continue connection
|
# continue connection
|
||||||
|
@ -1507,12 +1508,6 @@ class Connection:
|
||||||
self.connection.disconnect()
|
self.connection.disconnect()
|
||||||
return
|
return
|
||||||
|
|
||||||
def ask_roster(self):
|
|
||||||
roster = {}
|
|
||||||
if self.connection:
|
|
||||||
roster = self.connection.getRoster().getRaw()
|
|
||||||
return roster
|
|
||||||
|
|
||||||
def build_privacy_rule(self, name, action):
|
def build_privacy_rule(self, name, action):
|
||||||
'''Build a Privacy rule stanza for invisibility'''
|
'''Build a Privacy rule stanza for invisibility'''
|
||||||
iq = common.xmpp.Iq('set', common.xmpp.NS_PRIVACY, xmlns = '')
|
iq = common.xmpp.Iq('set', common.xmpp.NS_PRIVACY, xmlns = '')
|
||||||
|
|
Loading…
Reference in New Issue