aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/jabber')
-rw-r--r--protocols/jabber/iq.c4
-rw-r--r--protocols/jabber/jabber.c2
-rw-r--r--protocols/jabber/jabber.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/protocols/jabber/iq.c b/protocols/jabber/iq.c
index 5166e322..2930e75f 100644
--- a/protocols/jabber/iq.c
+++ b/protocols/jabber/iq.c
@@ -554,7 +554,7 @@ static xt_status jabber_iq_display_vcard( struct im_connection *ic, struct xt_no
static xt_status jabber_add_to_roster_callback( struct im_connection *ic, struct xt_node *node, struct xt_node *orig );
-int jabber_add_to_roster( struct im_connection *ic, char *handle, char *name )
+int jabber_add_to_roster( struct im_connection *ic, const char *handle, const char *name, const char *group )
{
struct xt_node *node;
int st;
@@ -564,6 +564,8 @@ int jabber_add_to_roster( struct im_connection *ic, char *handle, char *name )
xt_add_attr( node, "jid", handle );
if( name )
xt_add_attr( node, "name", name );
+ if( group )
+ xt_add_child( node, xt_new_node( "group", group, NULL ) );
/* And pack it into a roster-add packet */
node = xt_new_node( "query", NULL, node );
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index cf491f81..d5948958 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -412,7 +412,7 @@ static void jabber_add_buddy( struct im_connection *ic, char *who, char *group )
return;
}
- if( jabber_add_to_roster( ic, who, NULL ) )
+ if( jabber_add_to_roster( ic, who, NULL, group ) )
presence_send_request( ic, who, "subscribe" );
}
diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h
index b3638597..45a1c5c1 100644
--- a/protocols/jabber/jabber.h
+++ b/protocols/jabber/jabber.h
@@ -234,7 +234,7 @@ int jabber_init_iq_auth( struct im_connection *ic );
xt_status jabber_pkt_bind_sess( struct im_connection *ic, struct xt_node *node, struct xt_node *orig );
int jabber_get_roster( struct im_connection *ic );
int jabber_get_vcard( struct im_connection *ic, char *bare_jid );
-int jabber_add_to_roster( struct im_connection *ic, char *handle, char *name );
+int jabber_add_to_roster( struct im_connection *ic, const char *handle, const char *name, const char *group );
int jabber_remove_from_roster( struct im_connection *ic, char *handle );
xt_status jabber_iq_query_features( struct im_connection *ic, char *bare_jid );
xt_status jabber_iq_query_server( struct im_connection *ic, char *jid, char *xmlns );