--- 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);
}