Software /
code /
prosody-modules
Changeset
2772:2c59f2f0c37d
mod_server_contact_info: Correctly pass the list of addresses to util.dataforms
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 23 Sep 2017 13:22:30 +0100 |
parents | 2771:397dafbd79fc |
children | 2773:7a4e8dbbd30d |
files | mod_server_contact_info/mod_server_contact_info.lua |
diffstat | 1 files changed, 1 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_server_contact_info/mod_server_contact_info.lua Fri Sep 22 20:34:56 2017 +0200 +++ b/mod_server_contact_info/mod_server_contact_info.lua Sat Sep 23 13:22:30 2017 +0100 @@ -42,15 +42,7 @@ local addresses = contact_config[t]; if addresses then t_insert(form_layout, { name = t .. "-addresses", type = "list-multi" }); - local values = {}; - if type(addresses) ~= "table" then - values[1] = { value = addresses }; - else - for i, address in ipairs(addresses) do - values[i] = { value = address }; - end - end - form_values[t .. "-addresses"] = values; + form_values[t .. "-addresses"] = addresses; end end