void api_disco_add_feature(char *plugin_name, char *feature) { if (feature == NULL) { return; } disco_add_feature(plugin_name, feature); caps_reset_ver(); // resend presence to update server's disco info data for this client if (connection_get_status() == JABBER_CONNECTED) { resource_presence_t last_presence = accounts_get_last_presence(session_get_account_name()); cl_ev_presence_send(last_presence, connection_get_presence_msg(), 0); } }
void caps_remove_feature(char *feature) { if (!g_hash_table_contains(prof_features, feature)) { return; } g_hash_table_remove(prof_features, feature); caps_reset_ver(); // resend presence to update server's disco info data for this client if (connection_get_status() == JABBER_CONNECTED) { resource_presence_t last_presence = accounts_get_last_presence(session_get_account_name()); cl_ev_presence_send(last_presence, connection_get_presence_msg(), 0); } }