Commit cf92bc1a authored by fred's avatar fred

chat: harden check for kick messages

parent fafdc08b
......@@ -622,6 +622,8 @@ $(function() {
var nick = $('.nick input').val()
var muc = $('div#chat').data('chatroom');
if (pres.getElementsByTagName('status').length == 1 &&
pres.getElementsByTagName('status')[0].attributes &&
pres.getElementsByTagName('status')[0].attributes.code &&
pres.getElementsByTagName('status')[0].attributes.code.value == '307') {
/* kicked */
var kicked = pres.getElementsByTagName('item')[0].attributes.nick.value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment