mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-25 21:42:07 +01:00
[muc] Check for self-presence first in presence listener
Fixes SMACK-914
This commit is contained in:
parent
ec456399b5
commit
52a49769f9
1 changed files with 6 additions and 6 deletions
|
@ -212,7 +212,12 @@ public class MultiUserChat {
|
|||
switch (presence.getType()) {
|
||||
case available:
|
||||
Presence oldPresence = occupantsMap.put(from, presence);
|
||||
if (oldPresence != null) {
|
||||
if (mucUser.getStatus().contains(MUCUser.Status.PRESENCE_TO_SELF_110)) {
|
||||
processedReflectedSelfPresence = true;
|
||||
synchronized (this) {
|
||||
notify();
|
||||
}
|
||||
} else if (oldPresence != null) {
|
||||
// Get the previous occupant's affiliation & role
|
||||
MUCUser mucExtension = MUCUser.from(oldPresence);
|
||||
MUCAffiliation oldAffiliation = mucExtension.getItem().getAffiliation();
|
||||
|
@ -228,11 +233,6 @@ public class MultiUserChat {
|
|||
newAffiliation,
|
||||
isUserStatusModification,
|
||||
from);
|
||||
} else if (mucUser.getStatus().contains(MUCUser.Status.PRESENCE_TO_SELF_110)) {
|
||||
processedReflectedSelfPresence = true;
|
||||
synchronized (this) {
|
||||
notify();
|
||||
}
|
||||
} else {
|
||||
// A new occupant has joined the room
|
||||
for (ParticipantStatusListener listener : participantStatusListeners) {
|
||||
|
|
Loading…
Reference in a new issue