} catch (EntityFormatException e) {
return createBadRequestError(stanza, serverRuntimeContext, sessionContext, "Invalid JID");
}
}
Affiliation currentAffiliation = room.getAffiliations().getAffiliation(target);
Affiliation newAffiliation = item.getAffiliation();
// if the target is present in the room, we need to send presence updates
// otherwise we should send messages
Occupant targetOccupant = room.findOccupantByJID(target);