diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/PresenceParser.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/PresenceParser.java b/src/main/java/de/pixart/messenger/parser/PresenceParser.java index f87353ac7..cabac0d0a 100644 --- a/src/main/java/de/pixart/messenger/parser/PresenceParser.java +++ b/src/main/java/de/pixart/messenger/parser/PresenceParser.java @@ -53,6 +53,7 @@ public class PresenceParser extends AbstractParser implements private void processConferencePresence(PresencePacket packet, Conversation conversation) { MucOptions mucOptions = conversation.getMucOptions(); + final Jid jid = conversation.getAccount().getJid(); final Jid from = packet.getFrom(); if (!from.isBareJid()) { final String type = packet.getAttribute("type"); @@ -65,7 +66,7 @@ public class PresenceParser extends AbstractParser implements if (item != null && !from.isBareJid()) { mucOptions.setError(MucOptions.Error.NONE); MucOptions.User user = parseItem(conversation, item, from); - if (codes.contains(MucOptions.STATUS_CODE_SELF_PRESENCE)) { + if (codes.contains(MucOptions.STATUS_CODE_SELF_PRESENCE) || (codes.isEmpty() && jid.equals(item.getAttributeAsJid("jid")))) { mucOptions.setOnline(); mucOptions.setSelf(user); if (mucOptions.onRenameListener != null) { @@ -107,10 +108,8 @@ public class PresenceParser extends AbstractParser implements } } } else if (type.equals("unavailable")) { - if (codes.contains(MucOptions.STATUS_CODE_SELF_PRESENCE) || - packet.getFrom().equals(mucOptions.getConversation().getJid())) { + if (codes.contains(MucOptions.STATUS_CODE_SELF_PRESENCE)) { if (codes.contains(MucOptions.STATUS_CODE_KICKED)) { - } else if (codes.contains(MucOptions.STATUS_CODE_KICKED)) { mucOptions.setError(MucOptions.Error.KICKED); } else if (codes.contains(MucOptions.STATUS_CODE_BANNED)) { mucOptions.setError(MucOptions.Error.BANNED); |