Skip to content

Commit

Permalink
jmap_contact.c: always include PROP-ID, even if with ALTID
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmurchison committed Aug 16, 2023
1 parent 4db5394 commit f385a94
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions imap/jmap_contact.c
Original file line number Diff line number Diff line change
Expand Up @@ -8518,7 +8518,7 @@ static unsigned _jsobject_to_card(struct jmap_parser *parser, json_t *obj,
if (flags & WANT_PROPID_FLAG) {
vcardproperty_add_parameter(prop, vcardparameter_new_propid(id));
}
else if (flags & WANT_ALTID_FLAG) {
if (flags & WANT_ALTID_FLAG) {
vcardproperty_add_parameter(prop, vcardparameter_new_altid(id));
}
if (lang && *lang) {
Expand Down Expand Up @@ -8557,7 +8557,7 @@ struct l10n_rock {

static unsigned _jsl10n_to_vcard(struct jmap_parser *parser, json_t *obj,
const char *key, const char *id,
struct l10n_by_id_t *l10n,
unsigned flags, struct l10n_by_id_t *l10n,
vcardcomponent *card, struct l10n_rock *rock)
{
json_t *patches =
Expand All @@ -8578,13 +8578,13 @@ static unsigned _jsl10n_to_vcard(struct jmap_parser *parser, json_t *obj,
if (altobj) {
if (rock->is_multi) {
const char *this_lang =
strcasecmp(l10n->deflang, lang) ? lang : NULL;
strcasecmpsafe(l10n->deflang, lang) ? lang : NULL;

r |= _jsobject_to_card(parser, altobj, id,
rock->u.multi.type,
rock->u.multi.prop_cb,
rock->u.multi.param_props,
WANT_ALTID_FLAG,
flags | WANT_ALTID_FLAG,
this_lang, card,
rock->u.multi.rock,
rock->groupnum);
Expand Down Expand Up @@ -8650,10 +8650,10 @@ static unsigned _jsmultiobject_to_card(struct jmap_parser *parser, json_t *jval,

jmap_parser_push(parser, id);

r |= _jsl10n_to_vcard(parser, obj, key, id, l10n, card, &lrock);
r |= _jsl10n_to_vcard(parser, obj, key, id, flags, l10n, card, &lrock);

if (l10n->lang) {
flags = WANT_ALTID_FLAG;
flags |= WANT_ALTID_FLAG;
}

/* Add base object to Card */
Expand Down Expand Up @@ -9000,7 +9000,7 @@ static unsigned _jsname_to_vcard(struct jmap_parser *parser, json_t *jval,
return 0;
}

_jsl10n_to_vcard(parser, jval, "name", NULL, l10n, card, &lrock);
_jsl10n_to_vcard(parser, jval, "name", NULL, 0, l10n, card, &lrock);

jmap_parser_push(parser, "name");

Expand Down Expand Up @@ -9298,7 +9298,7 @@ static unsigned _jsspeak_to_vcard(struct jmap_parser *parser,
return 0;
}

r = _jsl10n_to_vcard(parser, jval, "speakToAs", NULL, l10n, card, &lrock);
r = _jsl10n_to_vcard(parser, jval, "speakToAs", NULL, 0, l10n, card, &lrock);
jmap_parser_push(parser, "speakToAs");

/* Add base object to Card */
Expand Down

0 comments on commit f385a94

Please sign in to comment.