Software /
code /
prosody
Diff
plugins/muc/subject.lib.lua @ 8848:402d8febfa43
MUC: Advertise in whether participants are allowed to change the subject (#1155)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 01 Jun 2018 08:02:43 +0200 |
parent | 8606:b6b1f0f9b381 |
child | 8849:cd186331ab1f |
line wrap: on
line diff
--- 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";