diff options
| -rw-r--r-- | protocols/jabber/conference.c | 7 | ||||
| -rw-r--r-- | protocols/jabber/jabber.h | 1 | ||||
| -rw-r--r-- | protocols/jabber/presence.c | 2 | 
3 files changed, 7 insertions, 3 deletions
| diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c index d8c18df7..d236f0bb 100644 --- a/protocols/jabber/conference.c +++ b/protocols/jabber/conference.c @@ -53,7 +53,10 @@ struct groupchat *jabber_chat_join( struct im_connection *ic, char *room, char *  		g_free( jc );  		return NULL;  	} -	g_free( roomjid ); +	 +	/* roomjid isn't normalized yet, and we need an original version +	   of the nick to send a proper presence update. */ +	jc->my_full_jid = roomjid;  	c = imcb_chat_new( ic, room );  	c->data = jc; @@ -88,7 +91,7 @@ int jabber_chat_leave( struct groupchat *c, const char *reason )  	node = xt_new_node( "x", NULL, NULL );  	xt_add_attr( node, "xmlns", XMLNS_MUC ); -	node = jabber_make_packet( "presence", "unavailable", jc->me->full_jid, node ); +	node = jabber_make_packet( "presence", "unavailable", jc->my_full_jid, node );  	if( !jabber_write_packet( ic, node ) )  	{ diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h index 51550af8..bc639fea 100644 --- a/protocols/jabber/jabber.h +++ b/protocols/jabber/jabber.h @@ -118,6 +118,7 @@ struct jabber_chat  {  	int flags;  	char *name; +	char *my_full_jid; /* Separate copy because of case sensitivity. */  	struct jabber_buddy *me;  }; diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c index 63d4f66a..e53978ea 100644 --- a/protocols/jabber/presence.c +++ b/protocols/jabber/presence.c @@ -194,7 +194,7 @@ int presence_send_update( struct im_connection *ic )  	{  		struct jabber_chat *jc = c->data; -		xt_add_attr( node, "to", jc->me->full_jid ); +		xt_add_attr( node, "to", jc->my_full_jid );  		st = jabber_write_packet( ic, node );  	} | 
