Mercurial > pidgin.yaz
changeset 27593:6b1eb8dbf86e
Identify clients in XMPP caps based on the ui_info hash. Closes #9672.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sun, 12 Jul 2009 22:42:44 +0000 |
parents | 4cddfd2d06be |
children | 1b92b9b51e2a |
files | libpurple/protocols/jabber/jabber.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c Sun Jul 12 21:09:05 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sun Jul 12 22:42:44 2009 +0000 @@ -3439,8 +3439,9 @@ { 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,7 +3457,12 @@ } } - 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);