mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +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:
parent
81d647af56
commit
d2187b7374
4 changed files with 135 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue