Skip to content
Snippets Groups Projects
Commit 225ca870 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

we now catch all errors and send them to the gc if it's open

parent fa183bae
No related branches found
No related tags found
No related merge requests found
......@@ -259,32 +259,9 @@ class Connection:
gajim.log.debug('we are now unsubscribed to %s' % who)
self.dispatch('UNSUBSCRIBED', prs.getFrom().getStripped())
elif ptype == 'error':
# Error stuff differs in xmpppy. So this part may require more adapting
errmsg = prs.getError()
errcode = prs.getErrorCode()
if errcode == '400': #Bad Request: JID Malformed or Private message when not allowed
pass
elif errcode == '401': #No Password Provided
pass
elif errcode == '403': #forbidden : User is Banned
# Unauthorized Subject Change
# Attempt by Mere Member to Invite Others to a Members-Only Room
# Configuration Access to Non-Owner
# Attempt by Non-Owner to Modify Owner List
# Attempt by Non-Owner to Modify Admin List
# Destroy Request Submitted by Non-Owner
pass
elif errcode == '404': #item not found : Room Does Not Exist
pass
elif errcode == '405': #Not allowed : Attempt to Kick Moderator, Admin, or Owner
# Attempt to Ban an Admin or Owner
# Attempt to Revoke Voice from an Admin, Owner, or User with a Higher Affiliation
# Attempt to Revoke Moderator Privileges from an Admin or Owner
pass
elif errcode == '407': #registration required : User Is Not on Member List
#
pass
elif errcode == '409': #conflict : Nick Conflict
if errcode == '409': #conflict : Nick Conflict
self.dispatch('ERROR', errmsg)
else:
self.dispatch('NOTIFY', (prs.getFrom().getStripped(), 'error', \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment