# HG changeset patch
# Node ID e47150b0c649
# Parent  7842e3231dbb
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -376,6 +376,8 @@
 		* purple_account_get_ui_string
 		* purple_account_get_ui_bool
 		* purple_account_notify_added
+		* purple_account_request_add. Use purple_add_contact_request_new
+		  instead.
 		* purple_account_request_authorization
 		* purple_account_request_close
 		* purple_account_set_check_mail
diff --git a/libpurple/account.h b/libpurple/account.h
--- a/libpurple/account.h
+++ b/libpurple/account.h
@@ -155,22 +155,6 @@
 gboolean purple_account_is_disconnecting(PurpleAccount *account);
 
 /**
- * purple_account_request_add:
- * @account:     The account that was added.
- * @remote_user: The name of the user that added this account.
- * @alias:       The optional alias of the user.
- * @message:     The optional message sent from the user adding you.
- *
- * Notifies the user that the account was added to a remote user's buddy list
- * and asks the user if they want to add the remote user to their buddy list.
- *
- * This will present a dialog informing the local user that the remote user
- * added them to the remote user's buddy list and will ask if they want to add
- * the remote user to the buddy list.
- */
-void purple_account_request_add(PurpleAccount *account, const char *remote_user, const char *alias, const char *message);
-
-/**
  * purple_account_request_close_with_account:
  * @account:	   The account for which requests should be closed
  *
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -1090,32 +1090,6 @@
 }
 
 void
-purple_account_request_add(PurpleAccount *account, const char *remote_user,
-                           const char *alias, const char *message)
-{
-	PurpleAddContactRequest *request = NULL;
-	PurpleNotification *notification = NULL;
-	PurpleNotificationManager *manager = NULL;
-
-	g_return_if_fail(PURPLE_IS_ACCOUNT(account));
-	g_return_if_fail(remote_user != NULL);
-
-	request = purple_add_contact_request_new(account, remote_user);
-	if(alias != NULL && *alias != '\0') {
-		purple_add_contact_request_set_alias(request, alias);
-	}
-
-	if(message != NULL && *message != '\0') {
-		purple_add_contact_request_set_message(request, message);
-	}
-
-	notification = purple_notification_new_from_add_contact_request(request);
-
-	manager = purple_notification_manager_get_default();
-	purple_notification_manager_add(manager, notification);
-}
-
-void
 purple_account_request_close_with_account(PurpleAccount *account) {
 	PurpleNotificationManager *manager = NULL;
 
diff --git a/libpurple/protocols/demo/purpledemoprotocolactions.c b/libpurple/protocols/demo/purpledemoprotocolactions.c
--- a/libpurple/protocols/demo/purpledemoprotocolactions.c
+++ b/libpurple/protocols/demo/purpledemoprotocolactions.c
@@ -33,7 +33,7 @@
 #define TEMPORARY_TICK_PLURAL_STR N_("Pruning connection in %d seconds...")
 #define TEMPORARY_DISCONNECT_STR N_("%s pruned the connection")
 
-static const gchar *contacts[] = {"Alice", "Bob", "Carlos", "Erin", NULL };
+static const gchar *contacts[] = {"Alice", "Bob", "Carlos", "Erin" };
 
 static void
 purple_demo_protocol_remote_add(G_GNUC_UNUSED GSimpleAction *action,
@@ -41,15 +41,22 @@
                                 G_GNUC_UNUSED gpointer data)
 {
 	PurpleAccount *account = NULL;
-	PurpleAccountManager *manager = NULL;
+	PurpleAccountManager *account_manager = NULL;
+	PurpleAddContactRequest *request = NULL;
+	PurpleNotification *notification = NULL;
+	PurpleNotificationManager *notification_manager = NULL;
 	const gchar *account_id = NULL;
 	static gint counter = 0;
 
 	account_id = g_variant_get_string(parameter, NULL);
-	manager = purple_account_manager_get_default();
-	account = purple_account_manager_find_by_id(manager, account_id);
+	account_manager = purple_account_manager_get_default();
+	account = purple_account_manager_find_by_id(account_manager, account_id);
 
-	purple_account_request_add(account, contacts[counter], NULL, NULL);
+	request = purple_add_contact_request_new(account, contacts[counter]);
+	notification = purple_notification_new_from_add_contact_request(request);
+
+	notification_manager = purple_notification_manager_get_default();
+	purple_notification_manager_add(notification_manager, notification);
 
 	counter++;
 	if(counter >= G_N_ELEMENTS(contacts)) {
