pidgin: 21955510: Identify clients in XMPP caps based on t...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Sun Jul 12 18:45:38 EDT 2009


-----------------------------------------------------------------
Revision: 219555104d3512da56518e9ce582334b8c79bc04
Ancestor: b4aaa0e3f5a431d7f3c2a37891dabf557e3f1a15
Author: darkrain42 at pidgin.im
Date: 2009-07-12T22:42:44
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/219555104d3512da56518e9ce582334b8c79bc04

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

ChangeLog: 

Identify clients in XMPP caps based on the ui_info hash. Closes #9672.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	e4d67eda88bfc104fa70c5cc8b6580e98a0ddff9
+++ libpurple/protocols/jabber/jabber.c	f2ea33b504871cd11a7e0ab87a3a8d2588baf086
@@ -3439,8 +3439,9 @@ jabber_init_plugin(PurplePlugin *plugin)
 {
 	GHashTable *ui_info = purple_core_get_ui_info();
 	const gchar *ui_type;
-	const gchar *type = "pc"; /* default client type, if unknown or 
+	const gchar *type = "pc"; /* default client type, if unknown or
 								unspecified */
+	const gchar *ui_name = NULL;
 
 	jabber_plugin = plugin;
 
@@ -3456,8 +3457,13 @@ jabber_init_plugin(PurplePlugin *plugin)
 		}
 	}
 
-	jabber_add_identity("client", type, NULL, PACKAGE);
+	if (ui_info)
+		ui_name = g_hash_table_lookup(ui_info, "name");
+	if (ui_name == NULL)
+		ui_name = PACKAGE;
 
+	jabber_add_identity("client", type, NULL, ui_name);
+
 	/* initialize jabber_features list */
 	jabber_add_feature("jabber:iq:last", 0);
 	jabber_add_feature("jabber:iq:oob", 0);


More information about the Commits mailing list