Skip to content

Commit

Permalink
vcard4: ignore empty addresses while converting from vcard-temp
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Jun 21, 2024
1 parent 0534923 commit eef87be
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/xmpp/xmpp-im/xmpp_vcard4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,11 +844,12 @@ void VCard::fromVCardTemp(const XMPP::VCard &tempVCard)
// Addresses
PAddresses addresses;
for (const auto &addr : tempVCard.addressList()) {
addresses.append({ convertToParameters(addr), Address { addr } });
}
if (!addresses.isEmpty()) {
setAddresses(addresses);
PAddress pa { convertToParameters(addr), Address { addr } };
if (!pa.data.isEmpty()) {
addresses.append(pa);
}
}
setAddresses(addresses);

// Phones
PUrisOrTexts phones;
Expand Down

0 comments on commit eef87be

Please sign in to comment.