From 62bed98b846c5050d72c8796fbaa57fc711fe7eb Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 1 Jun 2018 08:02:43 +0200 Subject: MUC: Advertise in whether participants are allowed to change the subject (#1155) --- plugins/muc/subject.lib.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins/muc/subject.lib.lua') diff --git a/plugins/muc/subject.lib.lua b/plugins/muc/subject.lib.lua index 200b262d..3bedc69c 100644 --- a/plugins/muc/subject.lib.lua +++ b/plugins/muc/subject.lib.lua @@ -28,6 +28,14 @@ local function set_changesubject(room, changesubject) return true; end +module:hook("muc-disco#info", function (event) + table.insert(event.form, { + name = "muc#roominfo_changesubject"; + type = "boolean"; + }); + event.formdata["muc#roominfo_changesubject"] = get_changesubject(event.room); +end); + module:hook("muc-config-form", function(event) table.insert(event.form, { name = "muc#roomconfig_changesubject"; -- cgit v1.2.3