summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/conn-contact-info.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/conn-contact-info.c b/src/conn-contact-info.c
index 050aa228f..bdf02ba48 100644
--- a/src/conn-contact-info.c
+++ b/src/conn-contact-info.c
@@ -57,7 +57,10 @@ typedef enum {
/* in Telepathy, one multi-line value; in XMPP, a sequence of <LINE>s */
FIELD_LABEL,
/* same as FIELD_STRUCTURED except the last element may repeat n times */
- FIELD_ORG
+ FIELD_ORG,
+
+ /* a field we intentionally ignore */
+ FIELD_IGNORED
} FieldBehaviour;
typedef struct {
@@ -128,7 +131,8 @@ static VCardField known_fields[] = {
/* Things we don't handle: */
- /* PHOTO: we treat it as the avatar instead */
+ /* PHOTO is handled by the Avatar code */
+ { "PHOTO", NULL, FIELD_IGNORED },
/* KEY: is Base64 (perhaps? hard to tell from the XEP) */
/* LOGO: can be base64 or a URL */
@@ -371,6 +375,9 @@ _parse_vcard (WockyNode *vcard_node,
}
break;
+ case FIELD_IGNORED:
+ break;
+
default:
g_assert_not_reached ();
}
@@ -971,6 +978,9 @@ conn_contact_info_build_supported_fields (GabbleConnection *conn,
guint i;
TpContactInfoFieldFlags tp_flags = field->tp_flags;
+ if (field->behaviour == FIELD_IGNORED)
+ continue;
+
/* Shorthand to avoid having to put it in the struct initialization:
* on XMPP, there is no field that supports arbitrary type-parameters.
* Setting Parameters_Mandatory eliminates the special case that an