summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/isode/stroke/vcards/VCardManager.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/com/isode/stroke/vcards/VCardManager.java b/src/com/isode/stroke/vcards/VCardManager.java
index 80e7942..082aeeb 100644
--- a/src/com/isode/stroke/vcards/VCardManager.java
+++ b/src/com/isode/stroke/vcards/VCardManager.java
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2010-2015, Isode Limited, London, England. 2 * Copyright (c) 2010-2016, Isode Limited, London, England.
3 * All rights reserved. 3 * All rights reserved.
4 */ 4 */
5package com.isode.stroke.vcards; 5package com.isode.stroke.vcards;
@@ -82,14 +82,15 @@ public class VCardManager {
82 requestVCard(new JID()); 82 requestVCard(new JID());
83 } 83 }
84 84
85
86 private void handleVCardReceived(final JID actualJID, VCard vcard, ErrorPayload error) { 85 private void handleVCardReceived(final JID actualJID, VCard vcard, ErrorPayload error) {
87 if (error != null || vcard == null) { 86 if (error == null) {
88 vcard = new VCard(); 87 if (vcard == null) {
88 vcard = new VCard();
89 }
90 requestedVCards.remove(actualJID);
91 JID jid = actualJID.isValid() ? actualJID : ownJID.toBare();
92 setVCard(jid, vcard);
89 } 93 }
90 requestedVCards.remove(actualJID);
91 JID jid = actualJID.isValid() ? actualJID : ownJID.toBare();
92 setVCard(jid, vcard);
93 } 94 }
94 95
95 public SetVCardRequest createSetVCardRequest(final VCard vcard) { 96 public SetVCardRequest createSetVCardRequest(final VCard vcard) {