} else {
// user must be occupant to send direct message
return createMessageErrorStanza(room.getJID(), from, stanza.getID(), StanzaErrorType.MODIFY, StanzaErrorCondition.NOT_ACCEPTABLE, stanza);
}
} else {
X x = X.fromStanza(stanza);
if(x != null && x.getInvite() != null) {
if(sendingOccupant != null) {
// invite, forward modified invite
try {
Stanza invite = MUCHandlerHelper.createInviteMessageStanza(stanza, room.getPassword());
relayStanza(invite.getTo(), invite, serverRuntimeContext);
} catch (EntityFormatException e) {
// invalid format of invite element
return createMessageErrorStanza(room.getJID(), from, stanza.getID(), StanzaErrorType.MODIFY, StanzaErrorCondition.JID_MALFORMED, stanza);
}
} else {
// user must be occupant to send invite
return createMessageErrorStanza(room.getJID(), from, stanza.getID(), StanzaErrorType.MODIFY, StanzaErrorCondition.NOT_ACCEPTABLE, stanza);
}
} else if(x != null && x.getDecline() != null) {
// invite, forward modified decline
try {
Stanza decline = MUCHandlerHelper.createDeclineMessageStanza(stanza);
relayStanza(decline.getTo(), decline, serverRuntimeContext);
} catch (EntityFormatException e) {