# HG changeset patch # User Kim Alvefur # Date 1527832963 -7200 # Node ID 402d8febfa4368b9ffd7cdbfd3911292ca3c34f0 # Parent 74526c425dec55408ae1586d983b20e7629b3cfb MUC: Advertise in whether participants are allowed to change the subject (#1155) diff -r 74526c425dec -r 402d8febfa43 plugins/muc/subject.lib.lua --- a/plugins/muc/subject.lib.lua Wed May 30 22:43:45 2018 +0100 +++ b/plugins/muc/subject.lib.lua Fri Jun 01 08:02:43 2018 +0200 @@ -28,6 +28,14 @@ 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";