Return the real JID (if available) from the xmpp get_cb_real_name function.

Fri, 13 Jun 2008 04:19:31 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Fri, 13 Jun 2008 04:19:31 +0000
changeset 23499
3d18632e27a3
parent 23497
d9fe9ecaabf1
child 23500
e39b78b393fe

Return the real JID (if available) from the xmpp get_cb_real_name function.

libpurple/protocols/jabber/chat.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/jabber/chat.c	Fri Jun 13 01:08:31 2008 +0000
+++ b/libpurple/protocols/jabber/chat.c	Fri Jun 13 04:19:31 2008 +0000
@@ -342,12 +342,18 @@
 {
 	JabberStream *js = gc->proto_data;
 	JabberChat *chat;
+	JabberChatMember *jcm;
 
 	chat = jabber_chat_find_by_id(js, id);
 
 	if(!chat)
 		return NULL;
 
+	jcm = g_hash_table_lookup(chat->members, who);
+	if (jcm != NULL && jcm->jid)
+		return g_strdup(jcm->jid);
+	
+
 	return g_strdup_printf("%s@%s/%s", chat->room, chat->server, who);
 }
 

mercurial