changeset 23360:da78db9f188f

Pass the "real" chat username to the pidgin_retrieve_user_info function. Get rid of the get_cb_info implementation in the xmpp prpl as it isn't needed.
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 13 Jun 2008 04:57:45 +0000
parents 398f84dd4041
children 2a5bc3e6da7b d1eee441bf25 30b5f145a0f7
files libpurple/protocols/jabber/buddy.c libpurple/protocols/jabber/buddy.h libpurple/protocols/jabber/libxmpp.c pidgin/gtkutils.c
diffstat 4 files changed, 5 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c	Fri Jun 13 04:34:06 2008 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Fri Jun 13 04:57:45 2008 +0000
@@ -1793,22 +1793,6 @@
 	}
 }
 
-void jabber_buddy_get_info_chat(PurpleConnection *gc, int id,
-		const char *resource)
-{
-	JabberStream *js = gc->proto_data;
-	JabberChat *chat = jabber_chat_find_by_id(js, id);
-	char *full_jid;
-
-	if(!chat)
-		return;
-
-	full_jid = g_strdup_printf("%s@%s/%s", chat->room, chat->server, resource);
-	jabber_buddy_get_info_for_jid(js, full_jid);
-	g_free(full_jid);
-}
-
-
 static void jabber_buddy_set_invisibility(JabberStream *js, const char *who,
 		gboolean invisible)
 {
--- a/libpurple/protocols/jabber/buddy.h	Fri Jun 13 04:34:06 2008 +0000
+++ b/libpurple/protocols/jabber/buddy.h	Fri Jun 13 04:57:45 2008 +0000
@@ -96,8 +96,6 @@
 void jabber_buddy_remove_resource(JabberBuddy *jb, const char *resource);
 const char *jabber_buddy_get_status_msg(JabberBuddy *jb);
 void jabber_buddy_get_info(PurpleConnection *gc, const char *who);
-void jabber_buddy_get_info_chat(PurpleConnection *gc, int id,
-		const char *resource);
 
 GList *jabber_blist_node_menu(PurpleBlistNode *node);
 
--- a/libpurple/protocols/jabber/libxmpp.c	Fri Jun 13 04:34:06 2008 +0000
+++ b/libpurple/protocols/jabber/libxmpp.c	Fri Jun 13 04:57:45 2008 +0000
@@ -89,7 +89,7 @@
 	jabber_message_send_chat,		/* chat_send */
 	jabber_keepalive,				/* keepalive */
 	jabber_register_account,		/* register_user */
-	jabber_buddy_get_info_chat,		/* get_cb_info */
+	NULL,							/* get_cb_info */
 	NULL,							/* get_cb_away */
 	jabber_roster_alias_change,		/* alias_buddy */
 	jabber_roster_group_change,		/* group_buddy */
--- a/pidgin/gtkutils.c	Fri Jun 13 04:34:06 2008 +0000
+++ b/pidgin/gtkutils.c	Fri Jun 13 04:57:45 2008 +0000
@@ -1001,13 +1001,14 @@
 	}
 
 	prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(conn->prpl);
+	if (prpl_info != NULL && prpl_info->get_cb_real_name)
+		who = prpl_info->get_cb_real_name(conn, chat, name);
 	if (prpl_info == NULL || prpl_info->get_cb_info == NULL) {
-		pidgin_retrieve_user_info(conn, name);
+		pidgin_retrieve_user_info(conn, who ? who : name);
+		g_free(who);
 		return;
 	}
 
-	if (prpl_info->get_cb_real_name)
-		who = prpl_info->get_cb_real_name(conn, chat, name);
 	show_retrieveing_info(conn, who ? who : name);
 	prpl_info->get_cb_info(conn, chat, name);
 	g_free(who);