1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

Added notifications of occupant joining and leaving the room. SMACK-38

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2437 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2004-12-26 21:55:41 +00:00 committed by gaston
parent 81d647af56
commit d2187b7374
4 changed files with 135 additions and 0 deletions

View file

@ -2014,6 +2014,12 @@ public class MultiUserChat {
isUserStatusModification,
from);
}
else {
// A new occupant has joined the room
if (!isUserStatusModification) {
fireParticipantStatusListeners("joined", from);
}
}
}
else if (presence.getType() == Presence.Type.UNAVAILABLE) {
synchronized (occupantsMap) {
@ -2027,6 +2033,11 @@ public class MultiUserChat {
presence.getFrom().equals(myRoomJID),
mucUser,
from);
} else {
// An occupant has left the room
if (!isUserStatusModification) {
fireParticipantStatusListeners("left", from);
}
}
}
}