aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-07-07 12:12:36 +0100
committerMatthew Wild <mwild1@gmail.com>2018-07-07 12:12:36 +0100
commitfe271c1641d61f8d72c99d970120b59c9a51471b (patch)
tree6b868f794cdac53e03984415c3ff36040c46c4d3 /plugins/muc
parentbdb4a84ec419346ccede674299caa23ce51abff6 (diff)
downloadprosody-fe271c1641d61f8d72c99d970120b59c9a51471b.tar.gz
prosody-fe271c1641d61f8d72c99d970120b59c9a51471b.zip
MUC: Add allowmemberinvites to disco#info so clients know whether to allow users to invite others in a members-only room
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/members_only.lib.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/muc/members_only.lib.lua b/plugins/muc/members_only.lib.lua
index 76c4eab6..0cd68d08 100644
--- a/plugins/muc/members_only.lib.lua
+++ b/plugins/muc/members_only.lib.lua
@@ -62,8 +62,15 @@ end
module:hook("muc-disco#info", function(event)
event.reply:tag("feature", {var = get_members_only(event.room) and "muc_membersonly" or "muc_open"}):up();
+ table.insert(event.form, {
+ name = "{http://prosody.im/protocol/muc}roomconfig_allowmemberinvites";
+ label = "Allow members to invite new members?";
+ type = "boolean";
+ value = not not get_allow_member_invites(event.room);
+ });
end);
+
module:hook("muc-config-form", function(event)
table.insert(event.form, {
name = "muc#roomconfig_membersonly";