Software /
code /
prosody
Comparison
plugins/muc/members_only.lib.lua @ 8985:4101bcf9639a
MUC: Add allowmemberinvites to disco#info so clients know whether to allow users to invite others in a members-only room
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 07 Jul 2018 12:12:36 +0100 |
parent | 8976:92f0876b9230 |
child | 8987:596c8c7d98b1 |
comparison
equal
deleted
inserted
replaced
8984:fa80b3231a02 | 8985:4101bcf9639a |
---|---|
60 return true; | 60 return true; |
61 end | 61 end |
62 | 62 |
63 module:hook("muc-disco#info", function(event) | 63 module:hook("muc-disco#info", function(event) |
64 event.reply:tag("feature", {var = get_members_only(event.room) and "muc_membersonly" or "muc_open"}):up(); | 64 event.reply:tag("feature", {var = get_members_only(event.room) and "muc_membersonly" or "muc_open"}):up(); |
65 table.insert(event.form, { | |
66 name = "{http://prosody.im/protocol/muc}roomconfig_allowmemberinvites"; | |
67 label = "Allow members to invite new members?"; | |
68 type = "boolean"; | |
69 value = not not get_allow_member_invites(event.room); | |
70 }); | |
65 end); | 71 end); |
72 | |
66 | 73 |
67 module:hook("muc-config-form", function(event) | 74 module:hook("muc-config-form", function(event) |
68 table.insert(event.form, { | 75 table.insert(event.form, { |
69 name = "muc#roomconfig_membersonly"; | 76 name = "muc#roomconfig_membersonly"; |
70 type = "boolean"; | 77 type = "boolean"; |