check for errors when adding a transport contact. Fixes #8196

This commit is contained in:
Yann Leboulanger 2017-02-28 22:28:49 +01:00 committed by Philipp Hörist
parent 0f1d04e488
commit 1a3d60c637
1 changed files with 5 additions and 0 deletions

View File

@ -1271,6 +1271,11 @@ class AddNewContactWindow:
def _nec_gateway_prompt_received(self, obj):
if self.adding_jid:
jid, transport, type_ = self.adding_jid
if obj.stanza.getError():
ErrorDialog(_('Error while adding transport contact'),
_('This error occured while adding a contact for transport '
'%s:\n\n%s') % (transport, obj.stanza.getErrorMsg()))
return
if obj.prompt_jid:
self._add_jid(obj.prompt_jid, type_)
else: