final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
connection.addPacketListener(this, packetFilter);
muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
muc.addMessageListener(this);
DiscussionHistory history = new DiscussionHistory();
history.setMaxChars(0); // we do not want any historical messages
muc.join(endpoint.getNickname(), null, history, SmackConfiguration.getPacketReplyTimeout());
if (LOG.isInfoEnabled()) {
LOG.info("Joined room: " + muc.getRoom() + " as: " + endpoint.getNickname());
}