summaryrefslogtreecommitdiff
path: root/src/conn-aliasing.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-02-25 20:24:21 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-02-25 20:24:21 +0000
commit11831830a72fc6764ded29d6bba8f2106526c284 (patch)
tree53d76b5fd8a85f7b2881973902b6278edfea2e67 /src/conn-aliasing.c
parent88a1f373b8cf5e4c24eaf7b9c8a45f1d9c340a9d (diff)
After a SetContactInfo, fix a missing nickname if necessary
Otherwise, SetContactInfo would (in practice) result in discarding the nickname. In the process, introduce a new SET_ALIAS edit type, and use that for Aliasing instead of ...edit_alias. This alters the behaviour of test-set-contact-info.py (to be more useful).
Diffstat (limited to 'src/conn-aliasing.c')
-rw-r--r--src/conn-aliasing.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/conn-aliasing.c b/src/conn-aliasing.c
index 1d9307c3e..1afefe1c1 100644
--- a/src/conn-aliasing.c
+++ b/src/conn-aliasing.c
@@ -525,6 +525,8 @@ setaliases_foreach (gpointer key, gpointer value, gpointer user_data)
if (base->self_handle == handle)
{
+ GSList *edits = NULL;
+
/* User has called SetAliases on themselves - patch their vCard.
* FIXME: because SetAliases is currently synchronous, we ignore errors
* here, and just let the request happen in the background.
@@ -547,8 +549,10 @@ setaliases_foreach (gpointer key, gpointer value, gpointer user_data)
lm_message_unref (msg);
}
- gabble_vcard_manager_edit_alias (data->conn->vcard_manager, 0, NULL,
- NULL, G_OBJECT (data->conn), alias);
+ edits = g_slist_append (edits, gabble_vcard_manager_edit_info_new (
+ NULL, alias, GABBLE_VCARD_EDIT_SET_ALIAS, NULL));
+ gabble_vcard_manager_edit (data->conn->vcard_manager, 0, NULL,
+ NULL, G_OBJECT (data->conn), edits);
}
if (NULL != error)