diff options
Diffstat (limited to 'protocols/jabber')
-rw-r--r-- | protocols/jabber/conference.c | 2 | ||||
-rw-r--r-- | protocols/jabber/presence.c | 11 | ||||
-rw-r--r-- | protocols/jabber/xmltree.c | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c index c16236b3..f0d8f050 100644 --- a/protocols/jabber/conference.c +++ b/protocols/jabber/conference.c @@ -162,6 +162,8 @@ void jabber_chat_pkt_presence( struct im_connection *ic, struct jabber_buddy *bu if( bud == jc->me ) { + jabber_buddy_remove_bare( ic, jc->name ); + g_free( jc->name ); g_free( jc ); imcb_chat_free( chat ); diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c index 096b4fd5..1310fce3 100644 --- a/protocols/jabber/presence.c +++ b/protocols/jabber/presence.c @@ -167,6 +167,7 @@ int presence_send_update( struct im_connection *ic ) struct xt_node *node; char *show = jd->away_state->code; char *status = jd->away_message; + struct groupchat *c; int st; node = jabber_make_packet( "presence", NULL, NULL, NULL ); @@ -178,6 +179,16 @@ int presence_send_update( struct im_connection *ic ) st = jabber_write_packet( ic, node ); + /* Have to send this update to all groupchats too, the server won't + do this automatically. */ + for( c = ic->groupchats; c && st; c = c->next ) + { + struct jabber_chat *jc = c->data; + + xt_add_attr( node, "to", jc->me->full_jid ); + st = jabber_write_packet( ic, node ); + } + xt_free_node( node ); return st; } diff --git a/protocols/jabber/xmltree.c b/protocols/jabber/xmltree.c index 9e16b939..c8bef362 100644 --- a/protocols/jabber/xmltree.c +++ b/protocols/jabber/xmltree.c @@ -187,7 +187,7 @@ int xt_handle( struct xt_parser *xt, struct xt_node *node, int depth ) /* If there's no parent, the handler should mention <root> as a parent. */ g_strcasecmp( xt->handlers[i].parent, "<root>" ) == 0 ) ) ) { -// xt_print( node ); + xt_print( node ); st = xt->handlers[i].func( node, xt->data ); |