aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-06-01 08:02:43 +0200
committerKim Alvefur <zash@zash.se>2018-06-01 08:02:43 +0200
commit62bed98b846c5050d72c8796fbaa57fc711fe7eb (patch)
tree05f14478e439cb47d2f29fee0376c4420c04aff9 /plugins
parent55969635f133580d9d47ef35b0c1de7ae10d48da (diff)
downloadprosody-62bed98b846c5050d72c8796fbaa57fc711fe7eb.tar.gz
prosody-62bed98b846c5050d72c8796fbaa57fc711fe7eb.zip
MUC: Advertise in whether participants are allowed to change the subject (#1155)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/subject.lib.lua8
1 files changed, 8 insertions, 0 deletions
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";