Mercurial > prosody-modules
comparison mod_http_muc_log/mod_http_muc_log.lua @ 5117:2b94ee74d1f1
Backed out changeset 85882735fd33
This wasn't a complete fix and the complete fix is way too complex
for me to do right now without a test setup.
author | Jonas Schäfer <jonas@wielicki.name> |
---|---|
date | Sat, 17 Dec 2022 14:13:06 +0100 |
parents | 85882735fd33 |
children | 7bce75e74f86 |
comparison
equal
deleted
inserted
replaced
5116:85882735fd33 | 5117:2b94ee74d1f1 |
---|---|
19 local jid = name .. '@' .. module.host; | 19 local jid = name .. '@' .. module.host; |
20 return get_room_from_jid(jid); | 20 return get_room_from_jid(jid); |
21 end | 21 end |
22 | 22 |
23 local use_oob = module:get_option_boolean(module.name .. "_show_images", false); | 23 local use_oob = module:get_option_boolean(module.name .. "_show_images", false); |
24 local show_presence_by_default = module:get_option_boolean(module.name .. "_show_presence_by_default", true); | |
25 module:depends"http"; | 24 module:depends"http"; |
26 | 25 |
27 local template; | 26 local template; |
28 do | 27 do |
29 local template_filename = module:get_option_string(module.name .. "_template", "res/" .. module.name .. ".html"); | 28 local template_filename = module:get_option_string(module.name .. "_template", "res/" .. module.name .. ".html"); |
135 local data = httplib.formdecode(request.url.query); | 134 local data = httplib.formdecode(request.url.query); |
136 if data then | 135 if data then |
137 return data.p == "h" | 136 return data.p == "h" |
138 end | 137 end |
139 end | 138 end |
140 return not show_presence_by_default; | 139 return false; |
141 end | 140 end |
142 | 141 |
143 local function get_dates(room) --> { integer, ... } | 142 local function get_dates(room) --> { integer, ... } |
144 local date_list = archive.dates and archive:dates(room); | 143 local date_list = archive.dates and archive:dates(room); |
145 if date_list then | 144 if date_list then |