diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/PresenceParser.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/PresenceParser.java b/src/main/java/de/pixart/messenger/parser/PresenceParser.java index 710eca717..0e0b67382 100644 --- a/src/main/java/de/pixart/messenger/parser/PresenceParser.java +++ b/src/main/java/de/pixart/messenger/parser/PresenceParser.java @@ -256,9 +256,6 @@ public class PresenceParser extends AbstractParser implements final Contact contact = account.getRoster().getContact(from); if (type == null) { final String resource = from.isBareJid() ? "" : from.getResource(); - if (contact.setPresenceName(packet.findChildContent("nick", Namespace.NICK))) { - mXmppConnectionService.getAvatarService().clear(contact); - } Avatar avatar = Avatar.parsePresence(packet.findChild("x", "vcard-temp:x:update")); if (avatar != null && (!contact.isSelf() || account.getAvatar() == null)) { avatar.owner = from.asBareJid(); @@ -336,6 +333,9 @@ public class PresenceParser extends AbstractParser implements } mXmppConnectionService.onContactStatusChanged.onContactStatusChanged(contact, false); } else if (type.equals("subscribe")) { + if (contact.setPresenceName(packet.findChildContent("nick", Namespace.NICK))) { + mXmppConnectionService.getAvatarService().clear(contact); + } if (contact.getOption(Contact.Options.PREEMPTIVE_GRANT)) { mXmppConnectionService.sendPresencePacket(account, mPresenceGenerator.sendPresenceUpdatesTo(contact)); |