Software /
code /
prosody-modules
Changeset
3333:5be90562e14b
mod_conversejs: Allow custom tags to be inserted into the generated HTML
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 27 Sep 2018 11:55:35 +0100 |
parents | 3332:4fdd8b77da54 |
children | 3334:04e5e34893e1 |
files | mod_conversejs/mod_conversejs.lua |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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("</head>", table.concat(tags, "\n"):gsub("%%", "%%").."\n</head>"); +end + module:provides("http", { route = { GET = function (event)