prevent traceback when a room is destroyed. Fixes #5194
This commit is contained in:
parent
2ffd6cbcb8
commit
f501c2c4fe
|
@ -2329,12 +2329,13 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
||||||
r = destroy.getTagData('reason')
|
r = destroy.getTagData('reason')
|
||||||
if r:
|
if r:
|
||||||
reason += ' (%s)' % r
|
reason += ' (%s)' % r
|
||||||
try:
|
if destroy.getAttr('jid'):
|
||||||
jid = helpers.parse_jid(destroy.getAttr('jid'))
|
try:
|
||||||
except common.helpers.InvalidFormat:
|
jid = helpers.parse_jid(destroy.getAttr('jid'))
|
||||||
pass
|
reason += '\n' + _('You can join this room instead: %s') \
|
||||||
if jid:
|
% jid
|
||||||
reason += '\n' + _('You can join this room instead: %s') % jid
|
except common.helpers.InvalidFormat:
|
||||||
|
pass
|
||||||
statusCode = ['destroyed']
|
statusCode = ['destroyed']
|
||||||
else:
|
else:
|
||||||
reason = prs.getReason()
|
reason = prs.getReason()
|
||||||
|
|
Loading…
Reference in New Issue