mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +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()) {
|
switch (presence.getType()) {
|
||||||
case available:
|
case available:
|
||||||
Presence oldPresence = occupantsMap.put(from, presence);
|
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
|
// Get the previous occupant's affiliation & role
|
||||||
MUCUser mucExtension = MUCUser.from(oldPresence);
|
MUCUser mucExtension = MUCUser.from(oldPresence);
|
||||||
MUCAffiliation oldAffiliation = mucExtension.getItem().getAffiliation();
|
MUCAffiliation oldAffiliation = mucExtension.getItem().getAffiliation();
|
||||||
|
@ -228,11 +233,6 @@ public class MultiUserChat {
|
||||||
newAffiliation,
|
newAffiliation,
|
||||||
isUserStatusModification,
|
isUserStatusModification,
|
||||||
from);
|
from);
|
||||||
} else if (mucUser.getStatus().contains(MUCUser.Status.PRESENCE_TO_SELF_110)) {
|
|
||||||
processedReflectedSelfPresence = true;
|
|
||||||
synchronized (this) {
|
|
||||||
notify();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// A new occupant has joined the room
|
// A new occupant has joined the room
|
||||||
for (ParticipantStatusListener listener : participantStatusListeners) {
|
for (ParticipantStatusListener listener : participantStatusListeners) {
|
||||||
|
|
Loading…
Reference in a new issue