mod_register: Fix syntax errors

This commit is contained in:
Kim Alvefur 2017-01-06 13:14:17 +01:00
parent c29639e0db
commit ef391bf6c4

View file

@ -62,8 +62,7 @@ local registration_query = st.stanza("query", {xmlns = "jabber:iq:register"})
for _, field in ipairs(additional_fields) do
if type(field) == "table" then
registration_form[#registration_form + 1] = field;
else
elseif field_map[field] or field_map[field:sub(1, -2) then
elseif field_map[field] or field_map[field:sub(1, -2)] then
if field:match("%+$") then
field = field:sub(1, -2);
field_map[field].required = true;