comparison mod_conversejs/mod_conversejs.lua @ 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 4fdd8b77da54
children b46bb9392efe
comparison
equal deleted inserted replaced
3332:4fdd8b77da54 3333:5be90562e14b
74 end 74 end
75 75
76 return converse_options; 76 return converse_options;
77 end 77 end
78 78
79 local add_tags = module:get_option_set("conversejs_tags");
80
81 if add_tags then
82 local tags = {};
83 for tag in add_tags do
84 table.insert(tags, tag);
85 end
86 html_template = html_template:gsub("</head>", table.concat(tags, "\n"):gsub("%%", "%%").."\n</head>");
87 end
88
79 module:provides("http", { 89 module:provides("http", {
80 route = { 90 route = {
81 GET = function (event) 91 GET = function (event)
82 local converse_options = get_converse_options(); 92 local converse_options = get_converse_options();
83 93