Software /
code /
prosody
Comparison
plugins/muc/members_only.lib.lua @ 9034:1c709e3d2e5e
MUC: Improve labels of all config form items
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 13 Jul 2018 13:22:40 +0100 |
parent | 8987:596c8c7d98b1 |
child | 9035:173c0e16e704 |
comparison
equal
deleted
inserted
replaced
9033:f1b6efd5b379 | 9034:1c709e3d2e5e |
---|---|
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, { | 65 table.insert(event.form, { |
66 name = "{http://prosody.im/protocol/muc}roomconfig_allowmemberinvites"; | 66 name = "{http://prosody.im/protocol/muc}roomconfig_allowmemberinvites"; |
67 label = "Allow members to invite new members?"; | 67 label = "Allow members to invite new members"; |
68 type = "boolean"; | 68 type = "boolean"; |
69 value = not not get_allow_member_invites(event.room); | 69 value = not not get_allow_member_invites(event.room); |
70 }); | 70 }); |
71 end); | 71 end); |
72 | 72 |
73 | 73 |
74 module:hook("muc-config-form", function(event) | 74 module:hook("muc-config-form", function(event) |
75 table.insert(event.form, { | 75 table.insert(event.form, { |
76 name = "muc#roomconfig_membersonly"; | 76 name = "muc#roomconfig_membersonly"; |
77 type = "boolean"; | 77 type = "boolean"; |
78 label = "Make Room Members-Only?"; | 78 label = "Only allow members to join"; |
79 desc = "Enable this to only allow access for room owners, admins and members"; | |
79 value = get_members_only(event.room); | 80 value = get_members_only(event.room); |
80 }); | 81 }); |
81 table.insert(event.form, { | 82 table.insert(event.form, { |
82 name = "{http://prosody.im/protocol/muc}roomconfig_allowmemberinvites"; | 83 name = "{http://prosody.im/protocol/muc}roomconfig_allowmemberinvites"; |
83 type = "boolean"; | 84 type = "boolean"; |
84 label = "Allow members to invite new members?"; | 85 label = "Allow members to invite new members"; |
85 value = get_allow_member_invites(event.room); | 86 value = get_allow_member_invites(event.room); |
86 }); | 87 }); |
87 end, 100-6); | 88 end, 100-6); |
88 | 89 |
89 module:hook("muc-config-submitted/muc#roomconfig_membersonly", function(event) | 90 module:hook("muc-config-submitted/muc#roomconfig_membersonly", function(event) |