Compare commits
1 Commits
3610f18d7d
...
c293387954
| Author | SHA1 | Date | |
|---|---|---|---|
|
c293387954
|
@@ -936,14 +936,18 @@ stanza_create_caps_query_element(xmpp_ctx_t* ctx)
|
||||
|
||||
ProfAccount* account = accounts_get_account(session_get_account_name());
|
||||
gchar* client = account->client;
|
||||
bool is_custom_client = client != NULL;
|
||||
|
||||
GString* name_str = g_string_new(is_custom_client ? client : "Pidgin");
|
||||
|
||||
account_free(account);
|
||||
|
||||
xmpp_stanza_set_attribute(identity, "name", name_str->str);
|
||||
g_string_free(name_str, TRUE);
|
||||
auto_gchar gchar* name = g_strdup(client ? client : "Pidgin");
|
||||
|
||||
if (client) {
|
||||
gchar* space = strchr(name, ' ');
|
||||
if (space) {
|
||||
*space = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
xmpp_stanza_set_attribute(identity, "name", name);
|
||||
xmpp_stanza_add_child(query, identity);
|
||||
xmpp_stanza_release(identity);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user