Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/commands.c @ 1726:98917ddcbaab
Do not move a contact before the server's ACK
(The server could deny the request... Cf. Facebook chat.)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 28 Feb 2010 13:46:46 +0100 |
parents | 318c64ceb494 |
children | e6e89b1d7831 |
comparison
equal
deleted
inserted
replaced
1725:318c64ceb494 | 1726:98917ddcbaab |
---|---|
2086 | 2086 |
2087 strip_arg_special_chars(newgroupname); | 2087 strip_arg_special_chars(newgroupname); |
2088 | 2088 |
2089 group_utf8 = to_utf8(newgroupname); | 2089 group_utf8 = to_utf8(newgroupname); |
2090 if (strcmp(oldgroupname, group_utf8)) { | 2090 if (strcmp(oldgroupname, group_utf8)) { |
2091 guint msgflag; | 2091 /* guint msgflag; */ |
2092 | 2092 |
2093 xmpp_updatebuddy(bjid, name, *group_utf8 ? group_utf8 : NULL); | 2093 xmpp_updatebuddy(bjid, name, *group_utf8 ? group_utf8 : NULL); |
2094 scr_RosterUpDown(-1, 1); | 2094 scr_RosterUpDown(-1, 1); |
2095 | |
2096 /* We do not move the buddy right now because the server could reject | |
2097 * the request. Let's wait for the server answer. | |
2095 | 2098 |
2096 // If the buddy has a pending message flag, | 2099 // If the buddy has a pending message flag, |
2097 // we remove it temporarily in order to reset the global group | 2100 // we remove it temporarily in order to reset the global group |
2098 // flag. We set it back once the buddy is in the new group, | 2101 // flag. We set it back once the buddy is in the new group, |
2099 // which will update the new group's flag. | 2102 // which will update the new group's flag. |
2101 if (msgflag) | 2104 if (msgflag) |
2102 roster_msg_setflag(bjid, FALSE, FALSE); | 2105 roster_msg_setflag(bjid, FALSE, FALSE); |
2103 buddy_setgroup(bud, group_utf8); | 2106 buddy_setgroup(bud, group_utf8); |
2104 if (msgflag) | 2107 if (msgflag) |
2105 roster_msg_setflag(bjid, FALSE, TRUE); | 2108 roster_msg_setflag(bjid, FALSE, TRUE); |
2109 */ | |
2106 } | 2110 } |
2107 | 2111 |
2108 g_free(group_utf8); | 2112 g_free(group_utf8); |
2109 g_free(newgroupname); | 2113 g_free(newgroupname); |
2110 update_roster = TRUE; | 2114 update_roster = TRUE; |