From 74f4d15de763d9ac0b7345d55ca68767def2c191 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 7 Jul 2018 12:12:36 +0100 Subject: MUC: Add allowmemberinvites to disco#info so clients know whether to allow users to invite others in a members-only room --- plugins/muc/members_only.lib.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugins') 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"; -- cgit v1.2.3