# HG changeset patch # User Kim Alvefur # Date 1527561416 -7200 # Node ID ce61f1826f1fa3dcacb90effb1ceaf0ce0f30e26 # Parent a9fa98e28697848a908c34b58edda136a6bb7ffe mod_http_muc_log: Include URL in disco#info for public rooms diff -r a9fa98e28697 -r ce61f1826f1f mod_http_muc_log/mod_http_muc_log.lua --- a/mod_http_muc_log/mod_http_muc_log.lua Mon May 28 20:55:22 2018 +0200 +++ b/mod_http_muc_log/mod_http_muc_log.lua Tue May 29 04:36:56 2018 +0200 @@ -69,6 +69,14 @@ return true; end +module:hook("muc-disco#info", function (event) + local room = event.room; + if open_room(room) then + table.insert(event.form, { name = "muc#roominfo_logs", type="text-single" }); + event.formdata["muc#roominfo_logs"] = module:http_url() .. "/" .. get_link(jid_split(event.room.jid), nil); + end +end); + local function sort_Y(a,b) return a.year > b.year end local function sort_m(a,b) return a.n > b.n end