changeset 92:c6270994fb6e

[/trunk] Changeset 106 by mikael * Add buddy to roster automatically if we receive a presence message and buddy is not already in the roster.
author mikael
date Mon, 18 Apr 2005 18:33:24 +0000
parents 60eac956ce18
children b3618cb3bf65
files mcabber/src/roster.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/roster.c	Mon Apr 18 18:12:50 2005 +0000
+++ b/mcabber/src/roster.c	Mon Apr 18 18:33:24 2005 +0000
@@ -201,8 +201,9 @@
   roster *roster_usr;
 
   sl_user = roster_find(jid, jidsearch, ROSTER_TYPE_USER|ROSTER_TYPE_AGENT);
+  // If we can't find it, we add it
   if (sl_user == NULL)
-    return;
+    sl_user = roster_add_user(jid, NULL, NULL, ROSTER_TYPE_USER);
 
   roster_usr = (roster*)sl_user->data;
   roster_usr->status = bstat;