# HG changeset patch # User Matthew Wild # Date 1538045735 -3600 # Node ID 5be90562e14bf6b7720d3b430596bf254dd26d91 # Parent 4fdd8b77da5401b0442b87687d7605aa4359b640 mod_conversejs: Allow custom tags to be inserted into the generated HTML diff -r 4fdd8b77da54 -r 5be90562e14b mod_conversejs/mod_conversejs.lua --- a/mod_conversejs/mod_conversejs.lua Thu Sep 27 11:55:07 2018 +0100 +++ b/mod_conversejs/mod_conversejs.lua Thu Sep 27 11:55:35 2018 +0100 @@ -76,6 +76,16 @@ return converse_options; end +local add_tags = module:get_option_set("conversejs_tags"); + +if add_tags then + local tags = {}; + for tag in add_tags do + table.insert(tags, tag); + end + html_template = html_template:gsub("", table.concat(tags, "\n"):gsub("%%", "%%").."\n"); +end + module:provides("http", { route = { GET = function (event)