for (Invite invite : mucUser.getInvites()) {
notifyListeners(new InvitationEvent(MultiUserChatManager.this, xmppSession, invite.getFrom(), message.getFrom(), invite.getReason(), mucUser.getPassword(), invite.isContinue(), invite.getThread(), true));
}
} else {
// Check, if the message contains a direct invitation.
DirectInvitation directInvitation = message.getExtension(DirectInvitation.class);
if (directInvitation != null) {
notifyListeners(new InvitationEvent(MultiUserChatManager.this, xmppSession, message.getFrom(), directInvitation.getRoomAddress(), directInvitation.getReason(), directInvitation.getPassword(), directInvitation.isContinue(), directInvitation.getThread(), false));
}
}
}
}
});