--- a/ChangeLog.API Sat Apr 13 23:01:11 2024 -0500
+++ b/ChangeLog.API Sat Apr 13 23:08:29 2024 -0500
@@ -367,12 +367,15 @@
* purple_attention_type_get_unlocalized_name
* purple_base64_*. Use g_base64_* instead
+ * purple_blist_add_chat * purple_blist_get_ui_data
* purple_blist_node_get_ui_data
* purple_blist_node_set_ui_data
+ * purple_blist_remove_chat + * purple_blist_request_add_chat * purple_blist_set_ui_data
* purple_blist_update_buddy_icon
--- a/libpurple/buddy.h Sat Apr 13 23:01:11 2024 -0500
+++ b/libpurple/buddy.h Sat Apr 13 23:08:29 2024 -0500
@@ -39,7 +39,6 @@
@@ -65,8 +64,7 @@
#define PURPLE_BLIST_NODE_NAME(n) \
- (PURPLE_IS_CHAT(n) ? purple_chat_get_name(PURPLE_CHAT(n)) : \
- PURPLE_IS_BUDDY(n) ? purple_buddy_get_name(PURPLE_BUDDY(n)) : NULL)
+ (PURPLE_IS_BUDDY(n) ? purple_buddy_get_name(PURPLE_BUDDY(n)) : NULL) /**************************************************************************/
--- a/libpurple/buddyicon.c Sat Apr 13 23:01:11 2024 -0500
+++ b/libpurple/buddyicon.c Sat Apr 13 23:08:29 2024 -0500
@@ -878,7 +878,6 @@
g_return_val_if_fail(node != NULL, NULL);
if (!PURPLE_IS_META_CONTACT(node) &&
- !PURPLE_IS_CHAT(node) &&
!PURPLE_IS_GROUP(node)) {
@@ -945,7 +944,6 @@
g_return_val_if_fail(node != NULL, NULL);
if (!PURPLE_IS_META_CONTACT(node) &&
- !PURPLE_IS_CHAT(node) &&
!PURPLE_IS_GROUP(node)) {
@@ -1031,7 +1029,6 @@
else if (PURPLE_IS_META_CONTACT(node) ||
- PURPLE_IS_CHAT(node) ||
--- a/libpurple/buddylist.c Sat Apr 13 23:01:11 2024 -0500
+++ b/libpurple/buddylist.c Sat Apr 13 23:08:29 2024 -0500
@@ -199,24 +199,6 @@
-chat_component_to_xmlnode(gpointer key, gpointer value, gpointer user_data)
- PurpleXmlNode *node, *child;
- name = (const char *)key;
- data = (const char *)value;
- node = (PurpleXmlNode *)user_data;
- g_return_if_fail(data != NULL);
- child = purple_xmlnode_new_child(node, "component");
- purple_xmlnode_set_attrib(child, "name", name);
- purple_xmlnode_insert_data(child, data, -1);
buddy_to_xmlnode(PurpleBuddy *buddy)
@@ -282,40 +264,6 @@
-chat_to_xmlnode(PurpleChat *chat)
- PurpleXmlNode *node, *child;
- PurpleAccount *account = purple_chat_get_account(chat);
- PurpleContactInfo *info = PURPLE_CONTACT_INFO(account);
- g_object_get(chat, "alias", &alias, NULL);
- node = purple_xmlnode_new("chat");
- purple_xmlnode_set_attrib(node, "proto",
- purple_account_get_protocol_id(account));
- purple_xmlnode_set_attrib(node, "account",
- purple_contact_info_get_username(info));
- child = purple_xmlnode_new_child(node, "alias");
- purple_xmlnode_insert_data(child, alias, -1);
- /* Write chat components */
- g_hash_table_foreach(purple_chat_get_components(chat),
- chat_component_to_xmlnode, node);
- /* Write chat settings */
- g_hash_table_foreach(purple_blist_node_get_settings(PURPLE_BLIST_NODE(chat)),
- value_to_xmlnode, node);
group_to_xmlnode(PurpleGroup *group)
PurpleXmlNode *node, *child;
@@ -339,11 +287,6 @@
child = contact_to_xmlnode(PURPLE_META_CONTACT(cnode));
purple_xmlnode_insert_child(node, child);
- else if (PURPLE_IS_CHAT(cnode))
- child = chat_to_xmlnode(PURPLE_CHAT(cnode));
- purple_xmlnode_insert_child(node, child);
@@ -556,57 +499,6 @@
-parse_chat(PurpleGroup *group, PurpleXmlNode *cnode)
- PurpleAccount *account;
- PurpleAccountManager *manager = purple_account_manager_get_default();
- const char *acct_name, *proto;
- GHashTable *components;
- acct_name = purple_xmlnode_get_attrib(cnode, "account");
- proto = purple_xmlnode_get_attrib(cnode, "proto");
- if(!acct_name || !proto) {
- account = purple_account_manager_find(manager, acct_name, proto);
- if((x = purple_xmlnode_get_child(cnode, "alias"))) {
- alias = purple_xmlnode_get_data(x);
- components = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
- for(x = purple_xmlnode_get_child(cnode, "component"); x; x = purple_xmlnode_get_next_twin(x)) {
- name = purple_xmlnode_get_attrib(x, "name");
- value = purple_xmlnode_get_data(x);
- g_hash_table_replace(components, g_strdup(name), value);
- chat = purple_chat_new(account, alias, components);
- purple_blist_add_chat(chat, group,
- _purple_blist_get_last_child((PurpleBlistNode*)group));
- for(x = purple_xmlnode_get_child(cnode, "setting"); x; x = purple_xmlnode_get_next_twin(x)) {
- parse_setting((PurpleBlistNode*)chat, x);
- g_clear_object(&account);
parse_group(PurpleXmlNode *groupnode)
const char *name = purple_xmlnode_get_attrib(groupnode, "name");
@@ -625,8 +517,6 @@
else if (purple_strequal(cnode->name, "contact") ||
purple_strequal(cnode->name, "person"))
parse_contact(group, cnode);
- else if (purple_strequal(cnode->name, "chat"))
- parse_chat(group, cnode);
@@ -823,104 +713,6 @@
purple_blist_fold_name(new_name), group);
-void purple_blist_add_chat(PurpleChat *chat, PurpleGroup *group, PurpleBlistNode *node)
- PurpleBlistNode *cnode = PURPLE_BLIST_NODE(chat);
- PurpleBuddyListClass *klass = NULL;
- PurpleCountingNode *group_counter;
- g_return_if_fail(PURPLE_IS_CHAT(chat));
- g_return_if_fail(PURPLE_IS_BUDDY_LIST(purplebuddylist));
- klass = PURPLE_BUDDY_LIST_GET_CLASS(purplebuddylist);
- group = purple_group_new(_("Chats"));
- /* Add group to blist if isn't already on it. Fixes #2752. */
- if (!purple_blist_find_group(purple_group_get_name(group))) {
- purple_blist_add_group(
- purple_blist_get_last_sibling(
- purple_blist_get_default_root()));
- group = PURPLE_GROUP(node->parent);
- /* if we're moving to overtop of ourselves, do nothing */
- /* This chat was already in the list and is
- group_counter = PURPLE_COUNTING_NODE(cnode->parent);
- purple_counting_node_change_total_size(group_counter, -1);
- if (purple_account_is_connected(purple_chat_get_account(chat))) {
- purple_counting_node_change_online_count(group_counter, -1);
- purple_counting_node_change_current_size(group_counter, -1);
- cnode->next->prev = cnode->prev;
- cnode->prev->next = cnode->next;
- if (cnode->parent->child == cnode)
- cnode->parent->child = cnode->next;
- if (klass && klass->remove) {
- klass->remove(purplebuddylist, cnode);
- /* ops->remove() cleaned up the cnode's ui_data, so we need to
- if (klass && klass->new_node) {
- klass->new_node(purplebuddylist, cnode);
- node->next->prev = cnode;
- cnode->next = node->next;
- cnode->parent = node->parent;
- group_counter = PURPLE_COUNTING_NODE(node->parent);
- purple_counting_node_change_total_size(group_counter, +1);
- if (purple_account_is_connected(purple_chat_get_account(chat))) {
- purple_counting_node_change_online_count(group_counter, +1);
- purple_counting_node_change_current_size(group_counter, +1);
- if (((PurpleBlistNode *)group)->child)
- ((PurpleBlistNode *)group)->child->prev = cnode;
- cnode->next = ((PurpleBlistNode *)group)->child;
- ((PurpleBlistNode *)group)->child = cnode;
- cnode->parent = PURPLE_BLIST_NODE(group);
- group_counter = PURPLE_COUNTING_NODE(group);
- purple_counting_node_change_total_size(group_counter, +1);
- if (purple_account_is_connected(purple_chat_get_account(chat))) {
- purple_counting_node_change_online_count(group_counter, +1);
- purple_counting_node_change_current_size(group_counter, +1);
- if (klass->save_node) {
- klass->save_node(purplebuddylist, cnode);
- klass->update(purplebuddylist,
- PURPLE_BLIST_NODE(cnode));
- purple_signal_emit(purple_blist_get_handle(), "blist-node-added",
void purple_blist_add_buddy(PurpleBuddy *buddy, PurpleMetaContact *contact, PurpleGroup *group, PurpleBlistNode *node)
PurpleBuddyListClass *klass = NULL;
@@ -1106,8 +898,7 @@
klass = PURPLE_BUDDY_LIST_GET_CLASS(purplebuddylist);
priv = purple_buddy_list_get_instance_private(purplebuddylist);
- if (node && (PURPLE_IS_META_CONTACT(node) ||
+ if (node && (PURPLE_IS_META_CONTACT(node))) g = PURPLE_GROUP(node->parent);
@@ -1197,8 +988,7 @@
- if (node && (PURPLE_IS_META_CONTACT(node) ||
- PURPLE_IS_CHAT(node))) {
+ if (node && (PURPLE_IS_META_CONTACT(node))) { node->next->prev = cnode;
cnode->next = node->next;
@@ -1462,56 +1252,6 @@
purple_blist_remove_contact(contact);
-void purple_blist_remove_chat(PurpleChat *chat)
- PurpleBuddyListClass *klass = NULL;
- PurpleBlistNode *node, *gnode;
- PurpleCountingNode *group_counter;
- g_return_if_fail(PURPLE_IS_BUDDY_LIST(purplebuddylist));
- g_return_if_fail(PURPLE_IS_CHAT(chat));
- klass = PURPLE_BUDDY_LIST_GET_CLASS(purplebuddylist);
- node = (PurpleBlistNode *)chat;
- group = (PurpleGroup *)gnode;
- /* Remove the node from its parent */
- if (gnode->child == node)
- gnode->child = node->next;
- node->prev->next = node->next;
- node->next->prev = node->prev;
- /* Adjust size counts */
- group_counter = PURPLE_COUNTING_NODE(group);
- if (purple_account_is_connected(purple_chat_get_account(chat))) {
- purple_counting_node_change_online_count(group_counter, -1);
- purple_counting_node_change_current_size(group_counter, -1);
- purple_counting_node_change_total_size(group_counter, -1);
- if (klass && klass->remove) {
- klass->remove(purplebuddylist, node);
- if (klass && klass->remove_node) {
- klass->remove_node(purplebuddylist, node);
- purple_signal_emit(purple_blist_get_handle(), "blist-node-removed",
- PURPLE_BLIST_NODE(chat));
void purple_blist_remove_group(PurpleGroup *group)
PurpleAccountManager *manager = NULL;
@@ -1741,12 +1481,6 @@
klass->update(purplebuddylist,
- } else if (PURPLE_IS_CHAT(cnode) &&
- purple_chat_get_account(PURPLE_CHAT(cnode)) == account) {
- group_counter = PURPLE_COUNTING_NODE(gnode);
- purple_counting_node_change_online_count(group_counter, +1);
- purple_counting_node_change_current_size(group_counter, +1);
- klass->update(purplebuddylist, cnode);
klass->update(purplebuddylist, gnode);
@@ -1759,7 +1493,6 @@
PurpleBlistNode *gnode, *cnode, *bnode;
PurpleCountingNode *contact_counter, *group_counter;
PurpleMetaContact *contact;
GList *list = NULL, *iter = NULL;
@@ -1827,19 +1560,6 @@
- } else if (PURPLE_IS_CHAT(cnode)) {
- chat = PURPLE_CHAT(cnode);
- if(purple_chat_get_account(chat) == account) {
- group_counter = PURPLE_COUNTING_NODE(group);
- purple_counting_node_change_current_size(group_counter, -1);
- purple_counting_node_change_online_count(group_counter, -1);
- if (klass && klass->remove) {
- klass->remove(purplebuddylist,
@@ -1854,7 +1574,6 @@
purple_blist_walk(PurpleBlistWalkFunc group_func,
- PurpleBlistWalkFunc chat_func,
PurpleBlistWalkFunc meta_contact_func,
PurpleBlistWalkFunc contact_func,
@@ -1878,10 +1597,6 @@
contact_func(contact, data);
- if(PURPLE_IS_CHAT(meta_contact) && chat_func != NULL) {
- chat_func(meta_contact, data);
@@ -1909,21 +1624,6 @@
-purple_blist_request_add_chat(PurpleAccount *account, PurpleGroup *group,
- const char *alias, const char *name)
- PurpleBuddyListClass *klass = NULL;
- g_return_if_fail(PURPLE_IS_BUDDY_LIST(purplebuddylist));
- klass = PURPLE_BUDDY_LIST_GET_CLASS(purplebuddylist);
- if (klass != NULL && klass->request_add_chat != NULL) {
- klass->request_add_chat(purplebuddylist, account, group, alias,
purple_blist_request_add_group(void)
PurpleBuddyListClass *klass = NULL;
--- a/libpurple/buddylist.h Sat Apr 13 23:01:11 2024 -0500
+++ b/libpurple/buddylist.h Sat Apr 13 23:08:29 2024 -0500
@@ -43,7 +43,6 @@
#define PURPLE_BLIST_DEFAULT_GROUP_NAME (purple_blist_get_default_group_name())
@@ -95,8 +94,6 @@
* @set_visible: Hides or unhides the buddy list.
* @request_add_buddy: Called when information is needed to add a buddy to the
* buddy list. See purple_blist_request_add_buddy().
- * @request_add_chat: Called when information is needed to add a chat to the
- * buddy list. See purple_blist_request_add_chat().
* @request_add_group: Called when information is needed to add a group to the
* buddy list. See purple_blist_request_add_group().
* @save_node: This is called when a node has been modified and should be
@@ -150,10 +147,6 @@
const char *username, const char *group,
- void (*request_add_chat)(PurpleBuddyList *list, PurpleAccount *account,
- PurpleGroup *group, const char *alias,
void (*request_add_group)(PurpleBuddyList *list);
void (*save_node)(PurpleBuddyList *list, PurpleBlistNode *node);
@@ -286,23 +279,6 @@
void purple_blist_update_groups_cache(PurpleGroup *group, const char *new_name);
- * purple_blist_add_chat:
- * @chat: The new chat who gets added
- * @group: The group to add the new chat to.
- * @node: The insertion point
- * Adds a new chat to the buddy list.
- * The chat will be inserted right after node or appended to the end
- * of group if node is NULL. If both are NULL, the buddy will be added to
-void purple_blist_add_chat(PurpleChat *chat, PurpleGroup *group, PurpleBlistNode *node);
* purple_blist_add_buddy:
* @buddy: The new buddy who gets added
* @contact: The optional contact to place the buddy in.
@@ -382,17 +358,6 @@
void purple_blist_remove_contact(PurpleMetaContact *contact);
- * purple_blist_remove_chat:
- * @chat: The chat to be removed
- * Removes a chat from the buddy list and frees the memory allocated to it.
-void purple_blist_remove_chat(PurpleChat *chat);
* purple_blist_remove_group:
* @group: The group to be removed
@@ -502,7 +467,6 @@
* @group_func: (scope call): The callback for groups
- * @chat_func: (scope call): The callback for chats
* @meta_contact_func: (scope call): The callback for meta-contacts
* @contact_func: (scope call): The callback for contacts
* @data: User supplied data.
@@ -513,7 +477,7 @@
-void purple_blist_walk(PurpleBlistWalkFunc group_func, PurpleBlistWalkFunc chat_func, PurpleBlistWalkFunc meta_contact_func, PurpleBlistWalkFunc contact_func, gpointer data);
+void purple_blist_walk(PurpleBlistWalkFunc group_func, PurpleBlistWalkFunc meta_contact_func, PurpleBlistWalkFunc contact_func, gpointer data); * purple_blist_get_default_group_name:
@@ -562,22 +526,6 @@
const char *group, const char *alias);
- * purple_blist_request_add_chat:
- * @account: The account the buddy is added to.
- * @group: The optional group to add the chat to.
- * @alias: The optional alias for the chat.
- * @name: The required chat name.
- * Requests from the user information needed to add a chat to the
-void purple_blist_request_add_chat(PurpleAccount *account, PurpleGroup *group,
- const char *alias, const char *name);
* purple_blist_request_add_group:
* Requests from the user information needed to add a group to the
--- a/libpurple/group.c Sat Apr 13 23:01:11 2024 -0500
+++ b/libpurple/group.c Sat Apr 13 23:08:29 2024 -0500
@@ -63,10 +63,7 @@
gnode = (PurpleBlistNode *)group;
for (cnode = gnode->child; cnode; cnode = cnode->next) {
- if (PURPLE_IS_CHAT(cnode)) {
- if (!g_slist_find(l, purple_chat_get_account(PURPLE_CHAT(cnode))))
- l = g_slist_append(l, purple_chat_get_account(PURPLE_CHAT(cnode)));
- } else if (PURPLE_IS_META_CONTACT(cnode)) {
+ if (PURPLE_IS_META_CONTACT(cnode)) { for (bnode = cnode->child; bnode; bnode = bnode->next) {
if (PURPLE_IS_BUDDY(bnode)) {
if (!g_slist_find(l, purple_buddy_get_account(PURPLE_BUDDY(bnode))))
@@ -85,11 +82,6 @@
if (PURPLE_IS_META_CONTACT(cnode)) {
if(purple_meta_contact_on_account((PurpleMetaContact *) cnode, account))
- } else if (PURPLE_IS_CHAT(cnode)) {
- PurpleChat *chat = (PurpleChat *)cnode;
- if ((!account && purple_account_is_connected(purple_chat_get_account(chat)))
- || purple_chat_get_account(chat) == account)
@@ -145,9 +137,6 @@
moved_buddies = g_list_append(moved_buddies, bnode);
- } else if (PURPLE_IS_CHAT(child)) {
- purple_blist_add_chat((PurpleChat *)child, dest, prev);
purple_debug_error("blistnodetypes", "Unknown child type in group %s", priv->name);
--- a/libpurple/purpleprotocolclient.c Sat Apr 13 23:01:11 2024 -0500
+++ b/libpurple/purpleprotocolclient.c Sat Apr 13 23:08:29 2024 -0500
@@ -87,25 +87,6 @@
-purple_protocol_client_find_blist_chat(PurpleProtocolClient *client,
- PurpleAccount *account,
- PurpleProtocolClientInterface *iface = NULL;
- g_return_val_if_fail(PURPLE_IS_PROTOCOL_CLIENT(client), NULL);
- g_return_val_if_fail(PURPLE_IS_ACCOUNT(account), NULL);
- g_return_val_if_fail(name != NULL, NULL);
- iface = PURPLE_PROTOCOL_CLIENT_GET_IFACE(client);
- if(iface != NULL && iface->find_blist_chat != NULL) {
- return iface->find_blist_chat(client, account, name);
purple_protocol_client_offline_message(PurpleProtocolClient *client,
--- a/libpurple/purpleprotocolclient.h Sat Apr 13 23:01:11 2024 -0500
+++ b/libpurple/purpleprotocolclient.h Sat Apr 13 23:08:29 2024 -0500
@@ -62,8 +62,6 @@
const gchar *(*normalize)(PurpleProtocolClient *client, PurpleAccount *account, const gchar *who);
- PurpleChat *(*find_blist_chat)(PurpleProtocolClient *client, PurpleAccount *account, const gchar *name);
gboolean (*offline_message)(PurpleProtocolClient *client, PurpleBuddy *buddy);
@@ -118,22 +116,6 @@
const gchar *purple_protocol_client_normalize(PurpleProtocolClient *client, PurpleAccount *account, const gchar *who);
- * purple_protocol_client_find_blist_chat:
- * @client: The #PurpleProtocolClient instance.
- * @account: A #PurpleAccount instance.
- * @name: The name of the chat to find.
- * Looks for a chat named @name in the contact list of @account.
- * Returns: (transfer none): The #PurpleChat instance or %NULL if no chat could
-PurpleChat *purple_protocol_client_find_blist_chat(PurpleProtocolClient *client, PurpleAccount *account, const gchar *name);
* purple_protocol_client_offline_message:
* @client: The #PurpleProtocolClient instance.
* @buddy: A #PurpleBuddy instance.