forbid resource when we add a contact. Fixes #1117
This commit is contained in:
parent
26f33196d7
commit
a6a72ccf8d
|
@ -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 \
|
||||
|
|
Loading…
Reference in New Issue