diff options
author | lookshe <github@lookshe.org> | 2016-03-08 21:13:24 +0100 |
---|---|---|
committer | lookshe <github@lookshe.org> | 2016-03-08 21:13:24 +0100 |
commit | 74d6d10cb76b7440f57db193a3c38e476206969c (patch) | |
tree | 665b7787c0f7bcb6d759e849972fa9658e84423f /src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java | |
parent | 7be757de90fb71042b79b88a76cd36fc07b2ee87 (diff) | |
parent | f051dd0bcdbd35d101420fb1f75f33a565a1e0f8 (diff) |
Merge branch 'trz/rebase' into trz/rename
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java b/src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java index 79ffa9bf..f575aaac 100644 --- a/src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java +++ b/src/main/java/de/thedevstack/conversationsplus/parser/PresenceParser.java @@ -66,10 +66,14 @@ public class PresenceParser extends AbstractParser implements Element item = x.findChild("item"); if (item != null && !from.isBareJid()) { mucOptions.setError(MucOptions.Error.NONE); - MucOptions.User user = new MucOptions.User(mucOptions,from); + MucOptions.User user = new MucOptions.User(mucOptions, from); user.setAffiliation(item.getAttribute("affiliation")); user.setRole(item.getAttribute("role")); - user.setJid(item.getAttributeAsJid("jid")); + Jid real = item.getAttributeAsJid("jid"); + if (real != null) { + user.setJid(real); + mucOptions.putMember(real.toBareJid()); + } if (codes.contains(MucOptions.STATUS_CODE_SELF_PRESENCE) || packet.getFrom().equals(mucOptions.getConversation().getJid())) { mucOptions.setOnline(); mucOptions.setSelf(user); |