aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/conference.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-07-01 20:58:23 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2007-07-01 20:58:23 +0100
commit9c9b37cbfa27a038bc57624cb9001f8db019290c (patch)
tree7fa0b45faaefb5b79e1688b7d95fb34f3f7c384d /protocols/jabber/conference.c
parentb9f8b870f7b884747b747be91ce0ac797a7c6e82 (diff)
Keeping an original (not normalized) copy of the user's nickname. This
fixes a bug reported by James Teh in the monster ticket #20. There's no proper garbage collection yet in the Jabber conference code, really have to do that soon. :-(
Diffstat (limited to 'protocols/jabber/conference.c')
-rw-r--r--protocols/jabber/conference.c7
1 files changed, 5 insertions, 2 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 ) )
{