# HG changeset patch # User Mikael Berthe # Date 1201113951 -3600 # Node ID f69028ca629617eec97cd78adbec1dc480aa97a1 # Parent 783b47c9d963a6541f2cbfd617a41cff1ca8dc50 Update the group pending message flags when moving a contact to another group diff -r 783b47c9d963 -r f69028ca6296 mcabber/src/commands.c --- a/mcabber/src/commands.c Sun Jan 20 22:46:16 2008 +0100 +++ b/mcabber/src/commands.c Wed Jan 23 19:45:51 2008 +0100 @@ -1816,9 +1816,21 @@ group_utf8 = to_utf8(newgroupname); if (strcmp(oldgroupname, group_utf8)) { + guint msgflag; + jb_updatebuddy(bjid, name, *group_utf8 ? group_utf8 : NULL); scr_RosterUp(); + + // If the buddy has a pending message flag, + // we remove it temporarily in order to reset the global group + // flag. We set it back once the buddy is in the new group, + // which will update the new group's flag. + msgflag = buddy_getflags(bud) & ROSTER_FLAG_MSG; + if (msgflag) + roster_msg_setflag(bjid, FALSE, FALSE); buddy_setgroup(bud, group_utf8); + if (msgflag) + roster_msg_setflag(bjid, FALSE, TRUE); } g_free(group_utf8);