Software /
code /
prosody
Diff
tools/form2table.lua @ 13142:879a6a33c21b
tools: Update imports to use new prosody.* namespace
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 08 Jun 2023 09:37:01 +0200 |
parent | 11194:9d1ce6f28401 |
line wrap: on
line diff
--- a/tools/form2table.lua Sat Jun 10 13:06:05 2023 +0200 +++ b/tools/form2table.lua Thu Jun 08 09:37:01 2023 +0200 @@ -1,4 +1,7 @@ -- Read an XML dataform and spit out a serialized Lua table of it +if not pcall(require, "prosody.loader") then + pcall(require, "loader"); +end local function from_stanza(stanza) local layout = { @@ -45,4 +48,5 @@ return layout; end -print("dataforms.new " .. require "util.serialization".serialize(from_stanza(require "util.xml".parse(io.read("*a"))), { unquoted = true })) +print("dataforms.new " .. require"prosody.util.serialization".serialize(from_stanza(require"prosody.util.xml".parse(io.read("*a"))), + { unquoted = true }))