Software /
code /
prosody-modules
Comparison
mod_http_xep227/mod_http_xep227.lua @ 4872:bc54f651b5a4
mod_http_xep227: Correctly read selected stores from URL query part
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 16 Jan 2022 15:01:53 +0000 |
parent | 4871:029ae3c29683 |
child | 4873:541b2cf68e93 |
comparison
equal
deleted
inserted
replaced
4871:029ae3c29683 | 4872:bc54f651b5a4 |
---|---|
182 | 182 |
183 user_xml:set_user_xml(username, session.host, input_xml_parsed); | 183 user_xml:set_user_xml(username, session.host, input_xml_parsed); |
184 | 184 |
185 local xep227_driver = sm.load_driver(session.host, "xep0227"); | 185 local xep227_driver = sm.load_driver(session.host, "xep0227"); |
186 | 186 |
187 local selected_stores = get_selected_stores(event.request.url.query); | 187 local query_params = http.formdecode(event.request.url.query or ""); |
188 local selected_stores = get_selected_stores(query_params); | |
188 | 189 |
189 for _, store_name in ipairs(selected_stores.keyval) do | 190 for _, store_name in ipairs(selected_stores.keyval) do |
190 -- Initialize the destination store (XEP-0227 backed) | 191 -- Initialize the destination store (XEP-0227 backed) |
191 local store = xep227_driver:open_xep0227(store_name, nil, user_xml); | 192 local store = xep227_driver:open_xep0227(store_name, nil, user_xml); |
192 | 193 |