Presence presence = (Presence)packet;
if (Presence.Type.error == presence.getType()) {
// A configuration must be wrong (eg. workgroup is not allowed to create rooms).
// Log the error presence
String warnMessage = "Possible server misconfiguration. Received error " +
"presence:" + presence.toXML();
Log.warn(warnMessage);
return;
}
// Get the JID of the presence's user
Element mucUser = presence.getChildElement("x", "http://jabber.org/protocol/muc#user");