Mercurial > hg
changeset 1418:f69028ca6296
Update the group pending message flags when moving a contact to another group
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Wed, 23 Jan 2008 19:45:51 +0100 |
parents | 783b47c9d963 |
children | fb438482b28e |
files | mcabber/src/commands.c |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);