| 114 |
115 |
| 115 if(node) |
116 if(node) |
| 116 xmlnode_set_attrib(query, "node", node); |
117 xmlnode_set_attrib(query, "node", node); |
| 117 |
118 |
| 118 if(!node || !strcmp(node, CAPS0115_NODE "#" VERSION)) { |
119 if(!node || !strcmp(node, CAPS0115_NODE "#" VERSION)) { |
| |
120 GHashTable *ui_info = purple_core_get_ui_info(); |
| |
121 const gchar *ui_type = g_hash_table_lookup(ui_info, "type"); |
| |
122 const gchar *type = "pc"; /* default client type, if unknown or |
| |
123 unspecified */ |
| |
124 |
| |
125 if (ui_type) { |
| |
126 if (strcmp(ui_type, "pc") == 0 || |
| |
127 strcmp(ui_type, "console") == 0 || |
| |
128 strcmp(ui_type, "phone") == 0 || |
| |
129 strcmp(ui_type, "handheld") == 0 || |
| |
130 strcmp(ui_type, "web") == 0 || |
| |
131 strcmp(ui_type, "bot") == 0) { |
| |
132 type = ui_type; |
| |
133 } |
| |
134 } |
| 119 identity = xmlnode_new_child(query, "identity"); |
135 identity = xmlnode_new_child(query, "identity"); |
| 120 xmlnode_set_attrib(identity, "category", "client"); |
136 xmlnode_set_attrib(identity, "category", "client"); |
| 121 xmlnode_set_attrib(identity, "type", "pc"); /* XXX: bot, console, |
137 xmlnode_set_attrib(identity, "type", type); |
| 122 * handheld, pc, phone, |
|
| 123 * web */ |
|
| 124 xmlnode_set_attrib(identity, "name", PACKAGE); |
138 xmlnode_set_attrib(identity, "name", PACKAGE); |
| 125 |
139 |
| 126 SUPPORT_FEATURE("jabber:iq:last") |
140 SUPPORT_FEATURE("jabber:iq:last") |
| 127 SUPPORT_FEATURE("jabber:iq:oob") |
141 SUPPORT_FEATURE("jabber:iq:oob") |
| 128 SUPPORT_FEATURE("jabber:iq:time") |
142 SUPPORT_FEATURE("jabber:iq:time") |