final String server = ecfConnection.getXMPPConnection().getHost();
final String domain = (properties == null) ? XMPPRoomID.DOMAIN_DEFAULT : (String) properties.get(PROP_XMPP_CONFERENCE);
final String conference = XMPPRoomID.fixConferenceDomain(domain, server);
final String roomID = roomname + XMPPRoomID.AT_SIGN + conference;
// create proxy to the room
final MultiUserChat muc = new MultiUserChat(ecfConnection.getXMPPConnection(), roomID);
if (!checkRoom(conference, roomID)) {
// otherwise create a new one
muc.create(nickname);
muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
final String subject = (properties == null) ? null : (String) properties.get(PROP_XMPP_SUBJECT);
if (subject != null)
muc.changeSubject(subject);
}
String longname = muc.getRoom();
if (longname == null || longname.length() <= 0) {
longname = roomID;
}
final RoomInfo info = MultiUserChat.getRoomInfo(ecfConnection.getXMPPConnection(), roomID);