block adding ourself in our roster. Fixes #4073

This commit is contained in:
Yann Leboulanger 2008-07-31 08:08:54 +00:00
parent a5584151c2
commit f586c8dd55
1 changed files with 5 additions and 0 deletions

View File

@ -869,6 +869,11 @@ _('Please fill in the data of the contact you want to add in account %s') %accou
ErrorDialog(pritext, _('The user ID must not contain a resource.'))
return
if jid == gajim.get_jid_from_account(self.account):
pritext = _('Invalid User ID')
ErrorDialog(pritext, _('You cannot add yourself to your roster.'))
return
nickname = self.nickname_entry.get_text().decode('utf-8') or ''
# get value of account combobox, if account was not specified
if not self.account: