--- a/ChangeLog.API Sat Apr 13 19:42:52 2024 -0500
+++ b/ChangeLog.API Sat Apr 13 20:25:38 2024 -0500
@@ -1127,6 +1127,7 @@
* pidgin_dialogs_alias_contact
* pidgin_dialogs_destroy_all
+ * pidgin_dialogs_im_with_user * pidgin_dialogs_merge_groups
* pidgin_dialogs_remove_buddy
--- a/pidgin/gtkdialogs.c Sat Apr 13 19:42:52 2024 -0500
+++ b/pidgin/gtkdialogs.c Sat Apr 13 20:25:38 2024 -0500
@@ -31,26 +31,6 @@
-pidgin_dialogs_im_with_user(PurpleAccount *account, const char *username)
- PurpleConversation *im;
- PurpleConversationManager *manager;
- g_return_if_fail(account != NULL);
- g_return_if_fail(username != NULL);
- manager = purple_conversation_manager_get_default();
- im = purple_conversation_manager_find_im(manager, account, username);
- if(!PURPLE_IS_IM_CONVERSATION(im)) {
- /* This constructor automagically registers the conversation with the
- purple_im_conversation_new(account, username);
pidgin_dialogs_info_cb(G_GNUC_UNUSED gpointer data, PurpleRequestPage *page) {
--- a/pidgin/gtkdialogs.h Sat Apr 13 19:42:52 2024 -0500
+++ b/pidgin/gtkdialogs.h Sat Apr 13 20:25:38 2024 -0500
@@ -33,18 +33,6 @@
- * pidgin_dialogs_im_with_user:
- * @account: The account.
- * @username: The username.
- * Creates an IM conversation with @username on @account if necessary.
-void pidgin_dialogs_im_with_user(PurpleAccount *account, const char *username);
* Creates a dialog to get another user's profile.
--- a/pidgin/pidginnotificationaddcontact.c Sat Apr 13 19:42:52 2024 -0500
+++ b/pidgin/pidginnotificationaddcontact.c Sat Apr 13 20:25:38 2024 -0500
@@ -161,14 +161,34 @@
PidginNotificationAddContact *pidgin_request = data;
PurpleAddContactRequest *request = NULL;
PurpleAccount *account = NULL;
- const gchar *username = NULL;
+ PurpleContact *contact = NULL; + PurpleContactManager *manager = NULL; + PurpleConversation *conversation = NULL; + const char *username = NULL; request = purple_notification_get_data(pidgin_request->notification);
account = purple_add_contact_request_get_account(request);
username = purple_add_contact_request_get_username(request);
- pidgin_dialogs_im_with_user(account, username);
+ manager = purple_contact_manager_get_default(); + contact = purple_contact_manager_find_with_username(manager, account, + if(!PURPLE_IS_CONTACT(contact)) { + g_warning("failed to find a user named '%s' on account %s", + purple_contact_info_get_username(PURPLE_CONTACT_INFO(account))); + conversation = purple_contact_find_dm(contact); + if(PURPLE_IS_CONVERSATION(conversation)) { + purple_conversation_present(conversation); + purple_contact_create_dm_async(contact, NULL, NULL, NULL); --- a/pidgin/pidginnotificationauthorizationrequest.c Sat Apr 13 19:42:52 2024 -0500
+++ b/pidgin/pidginnotificationauthorizationrequest.c Sat Apr 13 20:25:38 2024 -0500
@@ -189,14 +189,34 @@
PidginNotificationAuthorizationRequest *pidgin_request = data;
PurpleAuthorizationRequest *request = NULL;
PurpleAccount *account = NULL;
- const gchar *username = NULL;
+ PurpleContact *contact = NULL; + PurpleContactManager *manager = NULL; + PurpleConversation *conversation = NULL; + const char *username = NULL; request = purple_notification_get_data(pidgin_request->notification);
account = purple_authorization_request_get_account(request);
username = purple_authorization_request_get_username(request);
- pidgin_dialogs_im_with_user(account, username);
+ manager = purple_contact_manager_get_default(); + contact = purple_contact_manager_find_with_username(manager, account, + if(!PURPLE_IS_CONTACT(contact)) { + g_warning("failed to find a user named '%s' on account %s", + purple_contact_info_get_username(PURPLE_CONTACT_INFO(account))); + conversation = purple_contact_find_dm(contact); + if(PURPLE_IS_CONVERSATION(conversation)) { + purple_conversation_present(conversation); + purple_contact_create_dm_async(contact, NULL, NULL, NULL);