pidgin: 0c514d65: Return the real JID (if available) from ...

datallah at pidgin.im datallah at pidgin.im
Fri Jun 13 01:00:59 EDT 2008


-----------------------------------------------------------------
Revision: 0c514d6585e59f90f56e666cfb85495342ca9ff4
Ancestor: b499ce3771edb822dda585ef37acbafcc48b71f4
Author: datallah at pidgin.im
Date: 2008-06-13T04:19:31
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0c514d6585e59f90f56e666cfb85495342ca9ff4

Modified files:
        libpurple/protocols/jabber/chat.c

ChangeLog: 

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

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/chat.c	cac367aff66c4693fc91eccb7f95f0169a0a7a6e
+++ libpurple/protocols/jabber/chat.c	242114f0f78fecbd37c237f2d1fec3016a3f5bd0
@@ -342,12 +342,18 @@ char *jabber_chat_buddy_real_name(Purple
 {
 	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);
 }
 


More information about the Commits mailing list