if (to != null) {
Jid jid = new Jid(to);
if (jid.isRoom()) {
Room room = server.getRoom(jid.getRoom());
User user = server.getUserByConnection(connection);
room.broadcast(msg, user.getNicknameByRoom(room));
}
}
}
public void onSendMessage(String roomName, String nickname, String sender, String type, String msg) {