1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-30 07:52:06 +01:00

Do not fire invitation listeners with messages of type error. SMACK-102

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@3015 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2005-11-01 18:31:52 +00:00 committed by gato
parent 07b7900b2e
commit bcab930f28

View file

@ -2554,7 +2554,8 @@ public class MultiUserChat {
MUCUser mucUser = MUCUser mucUser =
(MUCUser) packet.getExtension("x", "http://jabber.org/protocol/muc#user"); (MUCUser) packet.getExtension("x", "http://jabber.org/protocol/muc#user");
// Check if the MUCUser extension includes an invitation // Check if the MUCUser extension includes an invitation
if (mucUser.getInvite() != null) { if (mucUser.getInvite() != null &&
((Message) packet).getType() != Message.Type.ERROR) {
// Fire event for invitation listeners // Fire event for invitation listeners
fireInvitationListeners(packet.getFrom(), mucUser.getInvite().getFrom(), fireInvitationListeners(packet.getFrom(), mucUser.getInvite().getFrom(),
mucUser.getInvite().getReason(), mucUser.getPassword(), (Message) packet); mucUser.getInvite().getReason(), mucUser.getPassword(), (Message) packet);