put contact in observer group when we remove it but let him see our status. Fixes #1494

This commit is contained in:
Yann Leboulanger 2006-02-20 22:08:02 +00:00
parent 9fe2475eba
commit 3317383918
2 changed files with 9 additions and 2 deletions

View File

@ -2194,6 +2194,7 @@ class Connection:
self.connection.getRoster().delItem(jid)
else:
self.connection.getRoster().Unsubscribe(jid)
self.update_contact(jid, '', [])
def _continue_unsubscribe(self, con, iq_obj, agent):
if iq_obj.getTag('error'):

View File

@ -1559,9 +1559,15 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
for cc in ccs:
cc.groups = contact.groups
self.add_contact_to_roster(cc.jid, account)
if gajim.interface.msg_win_mgr.has_window(contact.jid, account):
if not remove_auth:
contact.name = ''
contact.groups = []
contact.sub = 'from'
gajim.contacts.add_contact(account, contact)
self.add_contact_to_roster(contact.jid, account)
elif gajim.interface.msg_win_mgr.has_window(contact.jid, account):
c = gajim.contacts.create_contact(jid = contact.jid,
name = contact.name, groups = [_('Not in Roster')],
name = '', groups = [_('Not in Roster')],
show = 'not in roster', status = '', ask = 'none',
keyID = contact.keyID)
gajim.contacts.add_contact(account, c)