forbid resource when we add a contact. Fixes #1117

This commit is contained in:
Yann Leboulanger 2006-03-12 20:53:28 +00:00
parent 26f33196d7
commit a6a72ccf8d
1 changed files with 6 additions and 0 deletions

View File

@ -403,6 +403,12 @@ _('Please fill in the data of the contact you want to add in account %s') %accou
ErrorDialog(pritext, str(s)).get_response()
return
# No resource in jid
if jid.find('/') >= 0:
pritext = _('Invalid User ID')
ErrorDialog(pritext, _('The user ID must not contain a resource.')).get_response()
return
# Check if jid is already in roster
if jid in gajim.contacts.get_jid_list(self.account) and \
_('Not in Roster') not in \