private MultiUserChatManager(final XmppSession xmppSession) {
super(xmppSession, true);
this.serviceDiscoveryManager = xmppSession.getManager(ServiceDiscoveryManager.class);
this.messageListener = e -> {
Message message = e.getMessage();
MucUser mucUser = message.getExtension(MucUser.class);
if (mucUser != null) {
for (Invite invite : mucUser.getInvites()) {
XmppUtils.notifyEventListeners(invitationListeners, new InvitationEvent(MultiUserChatManager.this, xmppSession, invite.getFrom(), message.getFrom(), invite.getReason(), mucUser.getPassword(), invite.isContinue(), invite.getThread(), true));
}
} else {
DirectInvitation directInvitation = message.getExtension(DirectInvitation.class);
if (directInvitation != null) {
XmppUtils.notifyEventListeners(invitationListeners, new InvitationEvent(MultiUserChatManager.this, xmppSession, message.getFrom(), directInvitation.getRoomAddress(), directInvitation.getReason(), directInvitation.getPassword(), directInvitation.isContinue(), directInvitation.getThread(), false));
}
}
};
itemProvider = ResultSetProvider.forItems(enteredRoomsMap.values());
}