Mercurial > pidgin
diff libpurple/protocols/jabber/disco.c @ 25164:f462fa160f06
Sprinkle around more support for xml:lang on JabberIdentities
Change the IPC has_feature function to take a PurpleAccount and look up
the caps via the jbr
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 22 Nov 2008 18:26:45 +0000 |
parents | 6d6e10476c52 |
children | 1d1d1829de11 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/disco.c Sat Nov 22 04:32:11 2008 +0000 +++ b/libpurple/protocols/jabber/disco.c Sat Nov 22 18:26:45 2008 +0000 @@ -99,7 +99,7 @@ const char *node = NULL; char *node_uri = NULL; - // create custom caps node URI + /* create custom caps node URI */ node_uri = g_strconcat(CAPS0115_NODE, "#", jabber_caps_get_own_hash(js), NULL); if((in_query = xmlnode_get_child(packet, "query"))) { @@ -126,11 +126,14 @@ identity = xmlnode_new_child(query, "identity"); xmlnode_set_attrib(identity, "category", ident->category); xmlnode_set_attrib(identity, "type", ident->type); - if (ident->name != 0) xmlnode_set_attrib(identity, "name", ident->name); + if (ident->lang) + xmlnode_set_attrib(identity, "xml:lang", ident->lang); + if (ident->name) + xmlnode_set_attrib(identity, "name", ident->name); } for(features = jabber_features; features; features = features->next) { JabberFeature *feat = (JabberFeature*)features->data; - if(feat->is_enabled == NULL || feat->is_enabled(js, feat->namespace) == TRUE) { + if (!feat->is_enabled || feat->is_enabled(js, feat->namespace)) { feature = xmlnode_new_child(query, "feature"); xmlnode_set_attrib(feature, "var", feat->namespace); }