Mercurial > hg
changeset 818:55cd45481a07
Fix a buddylist bug when receiving a subscription request
The buddylist wasn't refreshed when a subscription request was received,
so the buffer window message couldn't be read.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 21 Apr 2006 19:08:04 +0200 |
parents | 6792164a4223 |
children | c2d7d9dd4193 |
files | mcabber/src/jabglue.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/jabglue.c Sat Apr 15 15:55:29 2006 +0200 +++ b/mcabber/src/jabglue.c Fri Apr 21 19:08:04 2006 +0200 @@ -1374,9 +1374,12 @@ { char *r; char *buf; + int newbuddy; r = jidtodisp(from); + newbuddy = !roster_find(r, jidsearch, 0); + if (!strcmp(type, "subscribe")) { /* The sender wishes to subscribe to our presence */ char *msg; @@ -1441,6 +1444,12 @@ } else { scr_LogPrint(LPRINT_LOGNORM, "Received unrecognized packet from <%s>, " "type=%s", from, (type ? type : "")); + newbuddy = FALSE; + } + + if (newbuddy) { + buddylist_build(); + update_roster = TRUE; } g_free(r); }