diff options
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index f98fc302f..4b3bcb427 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -775,23 +775,27 @@ chat_command_msg (EmpathyChat *chat, #endif static void +callback_for_request_rename(TpProxy *proxy, + const GError *error, + gpointer user_data, + GObject *weak_object) +{ + if (error != NULL) { + DEBUG ("Call to RequestRename method failed: %s",error->message); + } +} + +static void chat_command_nick (EmpathyChat *chat, GStrv strv) { EmpathyChatPriv *priv = GET_PRIV (chat); - TpConnection *connection; - GHashTable *new_alias; - TpHandle handle; - - connection = tp_account_get_connection (priv->account); - handle = tp_connection_get_self_handle (connection); - new_alias = g_hash_table_new (g_direct_hash, g_direct_equal); - g_hash_table_insert (new_alias, GUINT_TO_POINTER (handle), strv[1]); + TpProxy *proxy; - tp_cli_connection_interface_aliasing_call_set_aliases (connection, -1, - new_alias, NULL, NULL, NULL, NULL); + proxy = TP_PROXY (tp_account_get_connection (priv->account)); - g_hash_table_destroy (new_alias); + emp_cli_connection_interface_renaming_call_request_rename (proxy, -1, + strv[1], callback_for_request_rename, NULL, NULL, NULL); } static void |