diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2007-07-01 17:29:21 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2007-07-01 17:29:21 +0100 |
commit | b9f8b870f7b884747b747be91ce0ac797a7c6e82 (patch) | |
tree | c9878ed7826e424306c2e8956f636ac0db1d9513 /protocols/jabber/conference.c | |
parent | 2758cfed0abcb529975af34fdb4d2603febbf1a3 (diff) |
Better handling of private messages via groupchats.
Diffstat (limited to 'protocols/jabber/conference.c')
-rw-r--r-- | protocols/jabber/conference.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c index 1b392655..d8c18df7 100644 --- a/protocols/jabber/conference.c +++ b/protocols/jabber/conference.c @@ -127,7 +127,9 @@ void jabber_chat_pkt_presence( struct im_connection *ic, struct jabber_buddy *bu /* If this one wasn't set yet, this buddy just joined the chat. Slightly hackish way of finding out eh? ;-) */ - /* This is pretty messy... */ + /* This is pretty messy... Here it sets ext_jid to the real + JID of the participant. Works for non-anonymized channels. + Might break if someone joins a chat twice, though. */ for( c = node->children; ( c = xt_find_node( c, "x" ) ); c = c->next ) if( ( s = xt_find_attr( c, "xmlns" ) ) && ( strcmp( s, XMLNS_MUC_USER ) == 0 ) ) @@ -136,7 +138,7 @@ void jabber_chat_pkt_presence( struct im_connection *ic, struct jabber_buddy *bu if( ( s = xt_find_attr( c, "jid" ) ) ) { /* Yay, found what we need. :-) */ - bud->ext_jid = g_strdup( s ); + bud->ext_jid = jabber_normalize( s ); break; } } @@ -145,7 +147,7 @@ void jabber_chat_pkt_presence( struct im_connection *ic, struct jabber_buddy *bu if( bud->ext_jid == NULL ) { if( bud == jc->me ) - bud->ext_jid = g_strdup( ic->acc->user ); + bud->ext_jid = jabber_normalize( ic->acc->user ); else /* Don't want the nick to be at the end, so let's think of some slightly different notation to use |