XEP-0045 ambiguity concerning "visitor" role in unmoderated rooms
JohnXLivingston opened this issue · 1 comments
Describe the bug
XEP-0045 MUC considers that the "visitor" role is related to the room "moderated" option. But the XEP is not very clear about what we should do when an occupant has "visitor" role on an unmoderated room.
There is just this, somewhere hidden in the middle of the XEP: "** An implementation MAY grant voice by default to visitors in unmoderated rooms."
If we test with the Prosody server, and with ConverseJS as client, we can do "/mute XXX" in an unmoderated room.
This will indeed set the occupant as "visitor", and bounce all his messages.
But in such case, ConverseJS does not disable the message field. This is because of this part of the code:
canPostMessages () {
return this.isEntered() && !(this.features.get('moderated') && this.getOwnRole() === 'visitor');
}
I think we should remove the test on this.features.get('moderated')
.
To Reproduce
Steps to reproduce the behavior:
- Join an unmoderated room with 2 accounts: one owner, the other just participant (on a Prosody server)
- With the owner, do
/mute the_other_account
- See that the participant is now visitor, and that if he tries to send a message, Prosody will bounce it.
Expected behavior
Message field should be disabled for the visitor.
To follow this ticket