Comparison

plugins/muc/muc.lib.lua @ 9640:28d4b9d5a432 0.11

MUC: Fix traceback on muc#admin query with missing <item> child (#1242) Caused by a missing return statement introduced in 494938dec5d8
author Kim Alvefur <zash@zash.se>
date Sun, 25 Nov 2018 13:04:37 +0100
parent 9613:4d7b925652d9
child 9641:0ce404230388
child 9716:5281a795d6df
comparison
equal deleted inserted replaced
9639:78caa4aafda1 9640:28d4b9d5a432
902 902
903 function room_mt:handle_admin_query_set_command(origin, stanza) 903 function room_mt:handle_admin_query_set_command(origin, stanza)
904 local item = stanza.tags[1].tags[1]; 904 local item = stanza.tags[1].tags[1];
905 if not item then 905 if not item then
906 origin.send(st.error_reply(stanza, "cancel", "bad-request")); 906 origin.send(st.error_reply(stanza, "cancel", "bad-request"));
907 return true;
907 end 908 end
908 if item.attr.jid then -- Validate provided JID 909 if item.attr.jid then -- Validate provided JID
909 item.attr.jid = jid_prep(item.attr.jid); 910 item.attr.jid = jid_prep(item.attr.jid);
910 if not item.attr.jid then 911 if not item.attr.jid then
911 origin.send(st.error_reply(stanza, "modify", "jid-malformed")); 912 origin.send(st.error_reply(stanza, "modify", "jid-malformed"));