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

prevent traceback when a room is destroyed. Fixes #5194

parent 2ffd6cbc
No related branches found
No related tags found
No related merge requests found
......@@ -2329,12 +2329,13 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
r = destroy.getTagData('reason')
if r:
reason += ' (%s)' % r
try:
jid = helpers.parse_jid(destroy.getAttr('jid'))
except common.helpers.InvalidFormat:
pass
if jid:
reason += '\n' + _('You can join this room instead: %s') % jid
if destroy.getAttr('jid'):
try:
jid = helpers.parse_jid(destroy.getAttr('jid'))
reason += '\n' + _('You can join this room instead: %s') \
% jid
except common.helpers.InvalidFormat:
pass
statusCode = ['destroyed']
else:
reason = prs.getReason()
......
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