As I can see in xep-0045 there is option to limit max users in room:
<field
var='muc#roomconfig_maxusers'
type='list-single'
label='Maximum Number of Room Occupants'/>
I'm using Smack lib for Java to create rooms. And I send form during creation process like this:
[...]
List<String> list = new ArrayList<String>();
list.add("3");
submitForm.setAnswer("muc#roomconfig_maxusers", list);
[...]
muc.sendConfigurationForm(submitForm);
And it doesn't work. In one room I can see 4 ppl, for exmple, but server shouldn't accepted 4th invite, right?
Other options (muc#roomconfig_persistentroom
, muc#roomconfig_membersonly
, etc.) work fine. There is the problem only with muc#roomconfig_maxusers
.
I'm using last version of ejabberd.
How can I limit max users in MUC?
1) It isn't possible to set custom value for this option. You can check sources. Possible values are: [5, 10, 20, 30, 50, 100, 200, 500, 1000, 2000, 5000]
.
2) Admins doesn't count. So, if you have 5 ppl in room (1 of them admin), 1 man still can join this room.