Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/commands.c @ 2030:0771e130f79d
/rename: Do not send empty group attribute when the contact has no group
Thanks to nem for the report and Hermitifier for looking into it.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 11 Oct 2012 23:10:15 +0200 |
parents | 789779fd728d |
children | 71d84213f850 |
comparison
equal
deleted
inserted
replaced
2029:ca40744c03be | 2030:0771e130f79d |
---|---|
2185 del_name = TRUE; | 2185 del_name = TRUE; |
2186 if (on_srv) { | 2186 if (on_srv) { |
2187 /* We do not rename the buddy right now because the server could reject | 2187 /* We do not rename the buddy right now because the server could reject |
2188 * the request. Let's wait for the server answer. | 2188 * the request. Let's wait for the server answer. |
2189 */ | 2189 */ |
2190 xmpp_updatebuddy(bjid, (del_name ? NULL : name_utf8), group); | 2190 xmpp_updatebuddy(bjid, (del_name ? NULL : name_utf8), |
2191 group && *group ? group : NULL); | |
2191 } else { | 2192 } else { |
2192 // This is a local item, we rename it without adding to roster. | 2193 // This is a local item, we rename it without adding to roster. |
2193 buddy_setname(bud, (del_name ? (char*)bjid : name_utf8)); | 2194 buddy_setname(bud, (del_name ? (char*)bjid : name_utf8)); |
2194 if ((type & ROSTER_TYPE_ROOM) && xmpp_is_bookmarked(bjid) && | 2195 if ((type & ROSTER_TYPE_ROOM) && xmpp_is_bookmarked(bjid) && |
2195 settings_opt_get_int("muc_bookmark_autoupdate")) | 2196 settings_opt_get_int("muc_bookmark_autoupdate")) |