Always include role in MUCItem if it's set

As not including "role='none'" when kicking a user will result in an
XMPPErrorException. Also there appears to be nothing in XEP-45 which
says "if role is not set, then it defaults to 'none'".
This commit is contained in:
Florian Schmaus 2015-03-11 12:36:15 +01:00
parent e85c1881d7
commit f6ba363843
1 changed files with 1 additions and 3 deletions

View File

@ -148,9 +148,7 @@ public class MUCItem implements NamedElement {
xml.optAttribute("affiliation", getAffiliation());
xml.optAttribute("jid", getJid());
xml.optAttribute("nick", getNick());
if (role != null && role != MUCRole.none) {
xml.attribute("role", getRole());
}
xml.optAttribute("role", getRole());
xml.rightAngleBracket();
xml.optElement("reason", getReason());
if (getActor() != null) {