changeset 27160:0d01bd0c19ba

Use the JID for adding a chat/buddy because the name is for descriptive purpose only, and using it will not fill in the Add Chat dialog correctly. Because the JID is not visible, the user will not know what to actually put there instead.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 08 Jun 2009 02:24:49 +0000
parents 0baf79f7a58d
children dda65a7151a2
files pidgin/plugins/disco/gtkdisco.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/disco/gtkdisco.c	Sun Jun 07 22:12:26 2009 +0000
+++ b/pidgin/plugins/disco/gtkdisco.c	Mon Jun 08 02:24:49 2009 +0000
@@ -216,17 +216,17 @@
 {
 	struct _menu_cb_info *info = g_object_get_data(G_OBJECT(button), "disco-info");
 	PurpleAccount *account;
-	const char *name;
+	const char *jid;
 
 	g_return_if_fail(info != NULL);
 
 	account = purple_connection_get_account(info->list->pc);
-	name = info->service->name;
+	jid = info->service->jid;
 
 	if (info->service->type == XMPP_DISCO_SERVICE_TYPE_CHAT)
-		purple_blist_request_add_chat(account, NULL, NULL, name);
+		purple_blist_request_add_chat(account, NULL, NULL, jid);
 	else
-		purple_blist_request_add_buddy(account, name, NULL, NULL);
+		purple_blist_request_add_buddy(account, jid, NULL, NULL);
 }
 
 static void