From 276415f57070c062a4788e1056488739db83b45e Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 30 Mar 2006 17:55:25 +0000 Subject: [PATCH] we can now re-add a contact that was ith sub=none (so not shown at all in roster) --- src/dialogs.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dialogs.py b/src/dialogs.py index 4a54da46c..e67de5208 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -460,12 +460,12 @@ _('Please fill in the data of the contact you want to add in account %s') %accou return # Check if jid is already in roster - if jid in gajim.contacts.get_jid_list(self.account) and \ - _('Not in Roster') not in \ - gajim.contacts.get_first_contact_from_jid(self.account, jid).groups: - ErrorDialog(_('Contact already in roster'), - _('This contact is already listed in your roster.')).get_response() - return + if jid in gajim.contacts.get_jid_list(self.account): + c = gajim.contacts.get_first_contact_from_jid(self.account, jid) + if _('Not in Roster') not in c.groups and c.sub in ('both', 'to'): + ErrorDialog(_('Contact already in roster'), + _('This contact is already listed in your roster.')).get_response() + return message_buffer = self.xml.get_widget('message_textview').get_buffer() start_iter = message_buffer.get_start_iter()