[Telepathy-commits] [telepathy-idle/master] Handle user renames in muc rooms

Jonathon Jongsma jjongsma at gnome.org
Tue Jan 6 09:47:54 PST 2009


Previously, tp_group_mixin_change_members() was called with reason NONE, so UI
applications had no chance of displaying it as a rename rather than separate
quit and join operations.  Since idle now depends on a recent-enough tp-glib, we
can use the RENAMED reason (and also, use the new set_self_handle() API in the
TpGroupMixin as well)
---
 src/idle-muc-channel.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/idle-muc-channel.c b/src/idle-muc-channel.c
index b310064..ea394a0 100644
--- a/src/idle-muc-channel.c
+++ b/src/idle-muc-channel.c
@@ -1334,9 +1334,8 @@ void idle_muc_channel_rename(IdleMUCChannel *chan, TpHandle old_handle, TpHandle
 	TpIntSet *local = tp_intset_new();
 	TpIntSet *remote = tp_intset_new();
 
-	/* FIXME when self renaming lands in TpGroupMixin, use that */
 	if (old_handle == chan->group.self_handle)
-		chan->group.self_handle = new_handle;
+		tp_group_mixin_change_self_handle((GObject *) chan, new_handle);
 
 	tp_intset_add(remove, old_handle);
 
@@ -1349,8 +1348,7 @@ void idle_muc_channel_rename(IdleMUCChannel *chan, TpHandle old_handle, TpHandle
 	else
 		goto cleanup;
 
-	/* FIXME use REASON_RENAMED when it gets in telepathy-glib */
-	tp_group_mixin_change_members((GObject *) chan, NULL, add, remove, local, remote, new_handle, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+	tp_group_mixin_change_members((GObject *) chan, NULL, add, remove, local, remote, new_handle, TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED);
 
 cleanup:
 
-- 
1.5.6.5



More information about the Telepathy-commits mailing list