summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2011-05-11 16:32:40 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2011-05-11 18:27:18 +0100
commit6c13365154f6c9017489c1e8c7161294d2e62cfd (patch)
tree89002ce3e852fdd1fd7e0cefdb3305b3e3ea1651
parent411467f1f613ee5ba034694150fdd6310a45cdb0 (diff)
GroupMixin: correctly use contact-ids, not member-ids
For the past two-ish years telepathy-glib has included a key named 'member-ids' in the MembersChangedDetailed details dictionary. This is wrong: the spec says it should be called contact-ids. Whoops. I've checked Empathy, telepathy-logger, tp-glib and tp-qt4, and none of them rely on the incorrect name. So … I think we're safe to just change it. Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=37116> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r--telepathy-glib/group-mixin.c8
-rw-r--r--tests/dbus/group-mixin.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/telepathy-glib/group-mixin.c b/telepathy-glib/group-mixin.c
index 8120b98b5..dd3b26fde 100644
--- a/telepathy-glib/group-mixin.c
+++ b/telepathy-glib/group-mixin.c
@@ -1419,7 +1419,7 @@ maybe_add_member_ids (TpGroupMixin *mixin,
/* If the library user had its own ideas about which members' IDs to include
* in the change details, we'll leave that intact.
*/
- if (tp_asv_lookup (details, "member-ids") != NULL)
+ if (tp_asv_lookup (details, "contact-ids") != NULL)
return FALSE;
/* The library user didn't include the new members' IDs in details; let's add
@@ -1439,7 +1439,7 @@ maybe_add_member_ids (TpGroupMixin *mixin,
g_hash_table_insert (member_ids, GUINT_TO_POINTER (actor), (gchar *) id);
}
- g_hash_table_insert (details, "member-ids",
+ g_hash_table_insert (details, "contact-ids",
tp_g_value_slice_new_take_boxed (TP_HASH_TYPE_HANDLE_IDENTIFIER_MAP,
member_ids));
@@ -1450,10 +1450,10 @@ maybe_add_member_ids (TpGroupMixin *mixin,
static void
remove_member_ids (GHashTable *details)
{
- GValue *member_ids_v = g_hash_table_lookup (details, "member-ids");
+ GValue *member_ids_v = g_hash_table_lookup (details, "contact-ids");
g_assert (member_ids_v != NULL);
- g_hash_table_steal (details, "member-ids");
+ g_hash_table_steal (details, "contact-ids");
tp_g_value_slice_free (member_ids_v);
}
diff --git a/tests/dbus/group-mixin.c b/tests/dbus/group-mixin.c
index 558be19f1..e2f4f27cc 100644
--- a/tests/dbus/group-mixin.c
+++ b/tests/dbus/group-mixin.c
@@ -204,7 +204,7 @@ details_contains_ids_for (const GHashTable *details,
if (details == NULL)
return;
- member_ids_v = tp_asv_lookup (details, "member-ids");
+ member_ids_v = tp_asv_lookup (details, "contact-ids");
member_ids = g_value_get_boxed (member_ids_v);
for (h = hs; *h != 0; h++)
@@ -360,7 +360,7 @@ camel_removed (const GArray *added,
TpHandle h;
/* camel2 is the actor. camel shouldn't be in the ids, because they were
* removed and the spec says that you can leave those out, and we want
- * tp-glib's automatic construction of member-ids to work in the #ubuntu
+ * tp-glib's automatic construction of contact-ids to work in the #ubuntu
* case.
*/
TpHandle hs[] = { camel2, 0 };