Do not rename a contact before the server's ACK
authorMikael Berthe <mikael@lilotux.net>
Sun, 28 Feb 2010 13:31:57 +0100
changeset 1725 318c64ceb494
parent 1724 0fa71bfe703d
child 1726 98917ddcbaab
Do not rename a contact before the server's ACK (The server could deny the request... Cf. Facebook chat.)
mcabber/mcabber/commands.c
--- a/mcabber/mcabber/commands.c	Sun Feb 28 13:04:59 2010 +0100
+++ b/mcabber/mcabber/commands.c	Sun Feb 28 13:31:57 2010 +0100
@@ -2040,7 +2040,10 @@
     guint del_name = 0;
     if (!*newname || !strcmp(arg, "-"))
       del_name = TRUE;
-    buddy_setname(bud, (del_name ? (char*)bjid : name_utf8));
+    /* We do not rename the buddy right now because the server could reject
+     * the request.  Let's wait for the server answer.
+     * buddy_setname(bud, (del_name ? (char*)bjid : name_utf8));
+     */
     xmpp_updatebuddy(bjid, (del_name ? NULL : name_utf8), group);
   }