Index: src/bp-activity/bp-activity-actions.php
===================================================================
--- src/bp-activity/bp-activity-actions.php
+++ src/bp-activity/bp-activity-actions.php
@@ -746,6 +746,19 @@
 }
 
 /**
+ * Helper method to map action arguments to function parameters.
+ *
+ * @since 1.9.0
+ *
+ * @param int   $comment_id ID of the comment being notified about.
+ * @param array $params     Parameters to use with notification.
+ */
+function bp_activity_new_comment_notification_helper( $comment_id, $params ) {
+	bp_activity_new_comment_notification( $comment_id, $params['user_id'], $params );
+}
+add_action( 'bp_activity_comment_posted', 'bp_activity_new_comment_notification_helper', 10, 2 );
+
+/**
  * AJAX endpoint for Suggestions API lookups.
  *
  * @since 2.1.0
Index: src/bp-activity/bp-activity-functions.php
===================================================================
--- src/bp-activity/bp-activity-functions.php
+++ src/bp-activity/bp-activity-functions.php
@@ -3476,6 +3476,185 @@
 	do_action( 'bp_activity_mark_as_ham', $activity, $source );
 }
 
+/* Emails *********************************************************************/
+
+/**
+ * Send email and BP notifications when a user is mentioned in an update.
+ *
+ * @since 1.2.0
+ *
+ * @uses bp_notifications_add_notification()
+ * @uses bp_get_user_meta()
+ * @uses bp_core_get_user_displayname()
+ * @uses bp_activity_get_permalink()
+ * @uses bp_core_get_user_domain()
+ * @uses bp_get_settings_slug()
+ * @uses bp_activity_filter_kses()
+ * @uses bp_core_get_core_userdata()
+ * @uses wp_specialchars_decode()
+ * @uses get_blog_option()
+ * @uses bp_is_active()
+ * @uses bp_is_group()
+ * @uses bp_get_current_group_name()
+ * @uses apply_filters() To call the 'bp_activity_at_message_notification_to' hook.
+ * @uses apply_filters() To call the 'bp_activity_at_message_notification_subject' hook.
+ * @uses apply_filters() To call the 'bp_activity_at_message_notification_message' hook.
+ * @uses wp_mail()
+ * @uses do_action() To call the 'bp_activity_sent_mention_email' hook.
+ *
+ * @param int $activity_id      The ID of the activity update.
+ * @param int $receiver_user_id The ID of the user who is receiving the update.
+ */
+function bp_activity_at_message_notification( $activity_id, $receiver_user_id ) {
+	$notifications = BP_Core_Notification::get_all_for_user( $receiver_user_id, 'all' );
+
+	// Don't leave multiple notifications for the same activity item.
+	foreach( $notifications as $notification ) {
+		if ( $activity_id == $notification->item_id ) {
+			return;
+		}
+	}
+
+	$activity     = new BP_Activity_Activity( $activity_id );
+	$email_type   = 'activity-at-message';
+	$group_name   = '';
+	$message_link = bp_activity_get_permalink( $activity_id );
+	$poster_name  = bp_core_get_user_displayname( $activity->user_id );
+
+	remove_filter( 'bp_get_activity_content_body', 'convert_smilies' );
+	remove_filter( 'bp_get_activity_content_body', 'wpautop' );
+	remove_filter( 'bp_get_activity_content_body', 'bp_activity_truncate_entry', 5 );
+
+	/** This filter is documented in bp-activity/bp-activity-template.php */
+	$content = apply_filters( 'bp_get_activity_content_body', $activity->content );
+
+	add_filter( 'bp_get_activity_content_body', 'convert_smilies' );
+	add_filter( 'bp_get_activity_content_body', 'wpautop' );
+	add_filter( 'bp_get_activity_content_body', 'bp_activity_truncate_entry', 5 );
+
+	// Now email the user with the contents of the message (if they have enabled email notifications).
+	if ( 'no' != bp_get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) {
+		if ( bp_is_active( 'groups' ) && bp_is_group() ) {
+			$email_type = 'groups-at-message';
+			$group_name = bp_get_current_group_name();
+		}
+
+		$args = array(
+			'tokens' => array(
+				'activity'         => $activity,
+				'usermessage'      => wp_strip_all_tags( $content ),
+				'group.name'       => $group_name,
+				'mentioned.url'    => $message_link,
+				'poster.name'      => $poster_name,
+				'receiver-user.id' => $receiver_user_id,
+			),
+		);
+
+		bp_send_email( $email_type, $receiver_user_id, $args );
+	}
+
+	/**
+	 * Fires after the sending of an @mention email notification.
+	 *
+	 * @since 1.5.0
+	 * @since 2.5.0 $subject, $message, $content arguments unset and deprecated.
+	 *
+	 * @param BP_Activity_Activity $activity         Activity Item object.
+	 * @param string               $deprecated       Removed in 2.5; now an empty string.
+	 * @param string               $deprecated       Removed in 2.5; now an empty string.
+	 * @param string               $deprecated       Removed in 2.5; now an empty string.
+	 * @param int                  $receiver_user_id The ID of the user who is receiving the update.
+	 */
+	do_action( 'bp_activity_sent_mention_email', $activity, '', '', '', $receiver_user_id );
+}
+
+/**
+ * Send email and BP notifications when an activity item receives a comment.
+ *
+ * @since 1.2.0
+ * @since 2.5.0 Updated to use new email APIs.
+ *
+ * @uses bp_get_user_meta()
+ * @uses bp_core_get_user_displayname()
+ * @uses bp_activity_get_permalink()
+ * @uses bp_core_get_user_domain()
+ * @uses bp_get_settings_slug()
+ * @uses bp_activity_filter_kses()
+ * @uses bp_core_get_core_userdata()
+ * @uses wp_specialchars_decode()
+ * @uses get_blog_option()
+ * @uses bp_get_root_blog_id()
+ * @uses apply_filters() To call the 'bp_activity_new_comment_notification_to' hook.
+ * @uses apply_filters() To call the 'bp_activity_new_comment_notification_subject' hook.
+ * @uses apply_filters() To call the 'bp_activity_new_comment_notification_message' hook.
+ * @uses wp_mail()
+ * @uses do_action() To call the 'bp_activity_sent_reply_to_update_email' hook.
+ * @uses apply_filters() To call the 'bp_activity_new_comment_notification_comment_author_to' hook.
+ * @uses apply_filters() To call the 'bp_activity_new_comment_notification_comment_author_subject' hook.
+ * @uses apply_filters() To call the 'bp_activity_new_comment_notification_comment_author_message' hook.
+ * @uses do_action() To call the 'bp_activity_sent_reply_to_reply_email' hook.
+ *
+ * @param int   $comment_id   The comment id.
+ * @param int   $commenter_id The ID of the user who posted the comment.
+ * @param array $params       {@link bp_activity_new_comment()}.
+ */
+function bp_activity_new_comment_notification( $comment_id = 0, $commenter_id = 0, $params = array() ) {
+	$original_activity = new BP_Activity_Activity( $params['activity_id'] );
+	$poster_name       = bp_core_get_user_displayname( $commenter_id );
+	$thread_link       = bp_activity_get_permalink( $params['activity_id'] );
+
+	remove_filter( 'bp_get_activity_content_body', 'convert_smilies' );
+	remove_filter( 'bp_get_activity_content_body', 'wpautop' );
+	remove_filter( 'bp_get_activity_content_body', 'bp_activity_truncate_entry', 5 );
+
+	/** This filter is documented in bp-activity/bp-activity-template.php */
+	$content = apply_filters( 'bp_get_activity_content_body', $params['content'] );
+
+	add_filter( 'bp_get_activity_content_body', 'convert_smilies' );
+	add_filter( 'bp_get_activity_content_body', 'wpautop' );
+	add_filter( 'bp_get_activity_content_body', 'bp_activity_truncate_entry', 5 );
+
+	if ( $original_activity->user_id != $commenter_id && 'no' != bp_get_user_meta( $original_activity->user_id, 'notification_activity_new_reply', true ) ) {
+		$args = array(
+			'tokens' => array(
+				'comment.id'                => $comment_id,
+				'commenter.id'              => $commenter_id,
+				'usermessage'               => wp_strip_all_tags( $content ),
+				'original_activity.user_id' => $original_activity->user_id,
+				'poster.name'               => $poster_name,
+				'thread.url'                => esc_url( $thread_link ),
+			),
+		);
+
+		bp_send_email( 'activity-comment', $original_activity->user_id, $args );
+	}
+
+
+	/*
+	 * If this is a reply to another comment, send an email notification to the
+	 * author of the immediate parent comment.
+	 */
+	if ( empty( $params['parent_id'] ) || ( $params['activity_id'] == $params['parent_id'] ) ) {
+		return;
+	}
+
+	$parent_comment = new BP_Activity_Activity( $params['parent_id'] );
+
+	if ( $parent_comment->user_id != $commenter_id && $original_activity->user_id != $parent_comment->user_id && 'no' != bp_get_user_meta( $parent_comment->user_id, 'notification_activity_new_reply', true ) ) {
+		$args = array(
+			'tokens' => array(
+				'comment.id'             => $comment_id,
+				'commenter.id'           => $commenter_id,
+				'usermessage'            => wp_strip_all_tags( $content ),
+				'parent-comment-user.id' => $parent_comment->user_id,
+				'poster.name'            => $poster_name,
+				'thread.url'             => esc_url( $thread_link ),
+			),
+		);
+
+		bp_send_email( 'activity-comment-author', $parent_comment->user_id, $args );
+	}
+}
 
 /** Embeds *******************************************************************/
 
Index: src/bp-activity/bp-activity-notifications.php
===================================================================
--- src/bp-activity/bp-activity-notifications.php
+++ src/bp-activity/bp-activity-notifications.php
@@ -10,201 +10,6 @@
 // Exit if accessed directly.
 defined( 'ABSPATH' ) || exit;
 
-/* Emails *********************************************************************/
-
-/**
- * Send email and BP notifications when a user is mentioned in an update.
- *
- * @since 1.2.0
- *
- * @uses bp_notifications_add_notification()
- * @uses bp_get_user_meta()
- * @uses bp_core_get_user_displayname()
- * @uses bp_activity_get_permalink()
- * @uses bp_core_get_user_domain()
- * @uses bp_get_settings_slug()
- * @uses bp_activity_filter_kses()
- * @uses bp_core_get_core_userdata()
- * @uses wp_specialchars_decode()
- * @uses get_blog_option()
- * @uses bp_is_active()
- * @uses bp_is_group()
- * @uses bp_get_current_group_name()
- * @uses apply_filters() To call the 'bp_activity_at_message_notification_to' hook.
- * @uses apply_filters() To call the 'bp_activity_at_message_notification_subject' hook.
- * @uses apply_filters() To call the 'bp_activity_at_message_notification_message' hook.
- * @uses wp_mail()
- * @uses do_action() To call the 'bp_activity_sent_mention_email' hook.
- *
- * @param int $activity_id      The ID of the activity update.
- * @param int $receiver_user_id The ID of the user who is receiving the update.
- */
-function bp_activity_at_message_notification( $activity_id, $receiver_user_id ) {
-	$notifications = BP_Core_Notification::get_all_for_user( $receiver_user_id, 'all' );
-
-	// Don't leave multiple notifications for the same activity item.
-	foreach( $notifications as $notification ) {
-		if ( $activity_id == $notification->item_id ) {
-			return;
-		}
-	}
-
-	$activity     = new BP_Activity_Activity( $activity_id );
-	$email_type   = 'activity-at-message';
-	$group_name   = '';
-	$message_link = bp_activity_get_permalink( $activity_id );
-	$poster_name  = bp_core_get_user_displayname( $activity->user_id );
-
-	remove_filter( 'bp_get_activity_content_body', 'convert_smilies' );
-	remove_filter( 'bp_get_activity_content_body', 'wpautop' );
-	remove_filter( 'bp_get_activity_content_body', 'bp_activity_truncate_entry', 5 );
-
-	/** This filter is documented in bp-activity/bp-activity-template.php */
-	$content = apply_filters( 'bp_get_activity_content_body', $activity->content );
-
-	add_filter( 'bp_get_activity_content_body', 'convert_smilies' );
-	add_filter( 'bp_get_activity_content_body', 'wpautop' );
-	add_filter( 'bp_get_activity_content_body', 'bp_activity_truncate_entry', 5 );
-
-	// Now email the user with the contents of the message (if they have enabled email notifications).
-	if ( 'no' != bp_get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) {
-		if ( bp_is_active( 'groups' ) && bp_is_group() ) {
-			$email_type = 'groups-at-message';
-			$group_name = bp_get_current_group_name();
-		}
-
-		$args = array(
-			'tokens' => array(
-				'activity'         => $activity,
-				'usermessage'      => wp_strip_all_tags( $content ),
-				'group.name'       => $group_name,
-				'mentioned.url'    => $message_link,
-				'poster.name'      => $poster_name,
-				'receiver-user.id' => $receiver_user_id,
-			),
-		);
-
-		bp_send_email( $email_type, $receiver_user_id, $args );
-	}
-
-	/**
-	 * Fires after the sending of an @mention email notification.
-	 *
-	 * @since 1.5.0
-	 * @since 2.5.0 $subject, $message, $content arguments unset and deprecated.
-	 *
-	 * @param BP_Activity_Activity $activity         Activity Item object.
-	 * @param string               $deprecated       Removed in 2.5; now an empty string.
-	 * @param string               $deprecated       Removed in 2.5; now an empty string.
-	 * @param string               $deprecated       Removed in 2.5; now an empty string.
-	 * @param int                  $receiver_user_id The ID of the user who is receiving the update.
-	 */
-	do_action( 'bp_activity_sent_mention_email', $activity, '', '', '', $receiver_user_id );
-}
-
-/**
- * Send email and BP notifications when an activity item receives a comment.
- *
- * @since 1.2.0
- * @since 2.5.0 Updated to use new email APIs.
- *
- * @uses bp_get_user_meta()
- * @uses bp_core_get_user_displayname()
- * @uses bp_activity_get_permalink()
- * @uses bp_core_get_user_domain()
- * @uses bp_get_settings_slug()
- * @uses bp_activity_filter_kses()
- * @uses bp_core_get_core_userdata()
- * @uses wp_specialchars_decode()
- * @uses get_blog_option()
- * @uses bp_get_root_blog_id()
- * @uses apply_filters() To call the 'bp_activity_new_comment_notification_to' hook.
- * @uses apply_filters() To call the 'bp_activity_new_comment_notification_subject' hook.
- * @uses apply_filters() To call the 'bp_activity_new_comment_notification_message' hook.
- * @uses wp_mail()
- * @uses do_action() To call the 'bp_activity_sent_reply_to_update_email' hook.
- * @uses apply_filters() To call the 'bp_activity_new_comment_notification_comment_author_to' hook.
- * @uses apply_filters() To call the 'bp_activity_new_comment_notification_comment_author_subject' hook.
- * @uses apply_filters() To call the 'bp_activity_new_comment_notification_comment_author_message' hook.
- * @uses do_action() To call the 'bp_activity_sent_reply_to_reply_email' hook.
- *
- * @param int   $comment_id   The comment id.
- * @param int   $commenter_id The ID of the user who posted the comment.
- * @param array $params       {@link bp_activity_new_comment()}.
- */
-function bp_activity_new_comment_notification( $comment_id = 0, $commenter_id = 0, $params = array() ) {
-	$original_activity = new BP_Activity_Activity( $params['activity_id'] );
-	$poster_name       = bp_core_get_user_displayname( $commenter_id );
-	$thread_link       = bp_activity_get_permalink( $params['activity_id'] );
-
-	remove_filter( 'bp_get_activity_content_body', 'convert_smilies' );
-	remove_filter( 'bp_get_activity_content_body', 'wpautop' );
-	remove_filter( 'bp_get_activity_content_body', 'bp_activity_truncate_entry', 5 );
-
-	/** This filter is documented in bp-activity/bp-activity-template.php */
-	$content = apply_filters( 'bp_get_activity_content_body', $params['content'] );
-
-	add_filter( 'bp_get_activity_content_body', 'convert_smilies' );
-	add_filter( 'bp_get_activity_content_body', 'wpautop' );
-	add_filter( 'bp_get_activity_content_body', 'bp_activity_truncate_entry', 5 );
-
-	if ( $original_activity->user_id != $commenter_id && 'no' != bp_get_user_meta( $original_activity->user_id, 'notification_activity_new_reply', true ) ) {
-		$args = array(
-			'tokens' => array(
-				'comment.id'                => $comment_id,
-				'commenter.id'              => $commenter_id,
-				'usermessage'               => wp_strip_all_tags( $content ),
-				'original_activity.user_id' => $original_activity->user_id,
-				'poster.name'               => $poster_name,
-				'thread.url'                => esc_url( $thread_link ),
-			),
-		);
-
-		bp_send_email( 'activity-comment', $original_activity->user_id, $args );
-	}
-
-
-	/*
-	 * If this is a reply to another comment, send an email notification to the
-	 * author of the immediate parent comment.
-	 */
-	if ( empty( $params['parent_id'] ) || ( $params['activity_id'] == $params['parent_id'] ) ) {
-		return;
-	}
-
-	$parent_comment = new BP_Activity_Activity( $params['parent_id'] );
-
-	if ( $parent_comment->user_id != $commenter_id && $original_activity->user_id != $parent_comment->user_id && 'no' != bp_get_user_meta( $parent_comment->user_id, 'notification_activity_new_reply', true ) ) {
-		$args = array(
-			'tokens' => array(
-				'comment.id'             => $comment_id,
-				'commenter.id'           => $commenter_id,
-				'usermessage'            => wp_strip_all_tags( $content ),
-				'parent-comment-user.id' => $parent_comment->user_id,
-				'poster.name'            => $poster_name,
-				'thread.url'             => esc_url( $thread_link ),
-			),
-		);
-
-		bp_send_email( 'activity-comment-author', $parent_comment->user_id, $args );
-	}
-}
-
-/**
- * Helper method to map action arguments to function parameters.
- *
- * @since 1.9.0
- *
- * @param int   $comment_id ID of the comment being notified about.
- * @param array $params     Parameters to use with notification.
- */
-function bp_activity_new_comment_notification_helper( $comment_id, $params ) {
-	bp_activity_new_comment_notification( $comment_id, $params['user_id'], $params );
-}
-add_action( 'bp_activity_comment_posted', 'bp_activity_new_comment_notification_helper', 10, 2 );
-
-/** Notifications *************************************************************/
-
 /**
  * Format notifications related to activity.
  *
@@ -317,17 +122,15 @@
  * @param int    $receiver_user_id   ID of user receiving notification.
  */
 function bp_activity_at_mention_add_notification( $activity, $subject, $message, $content, $receiver_user_id ) {
-	if ( bp_is_active( 'notifications' ) ) {
-		bp_notifications_add_notification( array(
-			'user_id'           => $receiver_user_id,
-			'item_id'           => $activity->id,
-			'secondary_item_id' => $activity->user_id,
-			'component_name'    => buddypress()->activity->id,
-			'component_action'  => 'new_at_mention',
-			'date_notified'     => bp_core_current_time(),
-			'is_new'            => 1,
-		) );
-	}
+	bp_notifications_add_notification( array(
+		'user_id'           => $receiver_user_id,
+		'item_id'           => $activity->id,
+		'secondary_item_id' => $activity->user_id,
+		'component_name'    => buddypress()->activity->id,
+		'component_action'  => 'new_at_mention',
+		'date_notified'     => bp_core_current_time(),
+		'is_new'            => 1,
+	) );
 }
 add_action( 'bp_activity_sent_mention_email', 'bp_activity_at_mention_add_notification', 10, 5 );
 
@@ -341,10 +144,6 @@
  * @uses bp_notifications_mark_all_notifications_by_type()
  */
 function bp_activity_remove_screen_notifications( $user_id = 0 ) {
-	if ( ! bp_is_active( 'notifications' ) ) {
-		return;
-	}
-
 	// Only mark read if the current user is looking at his own mentions.
 	if ( empty( $user_id ) || (int) $user_id !== (int) bp_loggedin_user_id() ) {
 		return;
@@ -362,10 +161,6 @@
  * @param BP_Activity_Activity $activity Activity object.
  */
 function bp_activity_remove_screen_notifications_single_activity_permalink( $activity ) {
-	if ( ! bp_is_active( 'notifications' ) ) {
-		return;
-	}
-
 	if ( ! is_user_logged_in() ) {
 		return;
 	}
@@ -385,7 +180,7 @@
 function bp_activity_at_mention_delete_notification( $activity_ids_deleted = array() ) {
 	// Let's delete all without checking if content contains any mentions
 	// to avoid a query to get the activity.
-	if ( bp_is_active( 'notifications' ) && ! empty( $activity_ids_deleted ) ) {
+	if ( ! empty( $activity_ids_deleted ) ) {
 		foreach ( $activity_ids_deleted as $activity_id ) {
 			bp_notifications_delete_all_notifications_by_type( $activity_id, buddypress()->activity->id );
 		}
Index: src/bp-activity/classes/class-bp-activity-component.php
===================================================================
--- src/bp-activity/classes/class-bp-activity-component.php
+++ src/bp-activity/classes/class-bp-activity-component.php
@@ -55,10 +55,14 @@
 			'filters',
 			'template',
 			'functions',
-			'notifications',
 			'cache'
 		);
 
+		// Notifications support.
+		if ( bp_is_active( 'notifications' ) ) {
+			$includes[] = 'notifications';
+		}
+
 		if ( ! buddypress()->do_autoload ) {
 			$includes[] = 'classes';
 		}
Index: src/bp-friends/bp-friends-functions.php
===================================================================
--- src/bp-friends/bp-friends-functions.php
+++ src/bp-friends/bp-friends-functions.php
@@ -795,3 +795,66 @@
 	) );
 }
 add_action( 'bp_activity_mentions_prime_results', 'bp_friends_prime_mentions_results' );
+
+/** Emails ********************************************************************/
+
+/**
+ * Send notifications related to a new friendship request.
+ *
+ * When a friendship is requested, an email and a BP notification are sent to
+ * the user of whom friendship has been requested ($friend_id).
+ *
+ * @since 1.0.0
+ *
+ * @param int $friendship_id ID of the friendship object.
+ * @param int $initiator_id  ID of the user who initiated the request.
+ * @param int $friend_id     ID of the request recipient.
+ */
+function friends_notification_new_request( $friendship_id, $initiator_id, $friend_id ) {
+	if ( 'no' == bp_get_user_meta( (int) $friend_id, 'notification_friends_friendship_request', true ) ) {
+		return;
+	}
+
+	$args = array(
+		'tokens' => array(
+			'friend-requests.url' => esc_url( bp_core_get_user_domain( $friend_id ) . bp_get_friends_slug() . '/requests/' ),
+			'friend.id'           => $friend_id,
+			'friendship.id'       => $friendship_id,
+			'initiator.id'        => $initiator_id,
+			'initiator.url'       => esc_url( bp_core_get_user_domain( $initiator_id ) ),
+			'initiator.name'      => bp_core_get_user_displayname( $initiator_id ),
+		),
+	);
+	bp_send_email( 'friends-request', $friend_id, $args );
+}
+add_action( 'friends_friendship_requested', 'friends_notification_new_request', 10, 3 );
+
+/**
+ * Send notifications related to the acceptance of a friendship request.
+ *
+ * When a friendship request is accepted, an email and a BP notification are
+ * sent to the user who requested the friendship ($initiator_id).
+ *
+ * @since 1.0.0
+ *
+ * @param int $friendship_id ID of the friendship object.
+ * @param int $initiator_id  ID of the user who initiated the request.
+ * @param int $friend_id     ID of the request recipient.
+ */
+function friends_notification_accepted_request( $friendship_id, $initiator_id, $friend_id ) {
+	if ( 'no' == bp_get_user_meta( (int) $initiator_id, 'notification_friends_friendship_accepted', true ) ) {
+		return;
+	}
+
+	$args = array(
+		'tokens' => array(
+			'friend.id'      => $friend_id,
+			'friendship.url' => esc_url( bp_core_get_user_domain( $friend_id ) ),
+			'friend.name'    => bp_core_get_user_displayname( $friend_id ),
+			'friendship.id'  => $friendship_id,
+			'initiator.id'   => $initiator_id,
+		),
+	);
+	bp_send_email( 'friends-request-accepted', $initiator_id, $args );
+}
+add_action( 'friends_friendship_accepted', 'friends_notification_accepted_request', 10, 3 );
\ No newline at end of file
Index: src/bp-friends/bp-friends-notifications.php
===================================================================
--- src/bp-friends/bp-friends-notifications.php
+++ src/bp-friends/bp-friends-notifications.php
@@ -13,71 +13,6 @@
 // Exit if accessed directly.
 defined( 'ABSPATH' ) || exit;
 
-/** Emails ********************************************************************/
-
-/**
- * Send notifications related to a new friendship request.
- *
- * When a friendship is requested, an email and a BP notification are sent to
- * the user of whom friendship has been requested ($friend_id).
- *
- * @since 1.0.0
- *
- * @param int $friendship_id ID of the friendship object.
- * @param int $initiator_id  ID of the user who initiated the request.
- * @param int $friend_id     ID of the request recipient.
- */
-function friends_notification_new_request( $friendship_id, $initiator_id, $friend_id ) {
-	if ( 'no' == bp_get_user_meta( (int) $friend_id, 'notification_friends_friendship_request', true ) ) {
-		return;
-	}
-
-	$args = array(
-		'tokens' => array(
-			'friend-requests.url' => esc_url( bp_core_get_user_domain( $friend_id ) . bp_get_friends_slug() . '/requests/' ),
-			'friend.id'           => $friend_id,
-			'friendship.id'       => $friendship_id,
-			'initiator.id'        => $initiator_id,
-			'initiator.url'       => esc_url( bp_core_get_user_domain( $initiator_id ) ),
-			'initiator.name'      => bp_core_get_user_displayname( $initiator_id ),
-		),
-	);
-	bp_send_email( 'friends-request', $friend_id, $args );
-}
-add_action( 'friends_friendship_requested', 'friends_notification_new_request', 10, 3 );
-
-/**
- * Send notifications related to the acceptance of a friendship request.
- *
- * When a friendship request is accepted, an email and a BP notification are
- * sent to the user who requested the friendship ($initiator_id).
- *
- * @since 1.0.0
- *
- * @param int $friendship_id ID of the friendship object.
- * @param int $initiator_id  ID of the user who initiated the request.
- * @param int $friend_id     ID of the request recipient.
- */
-function friends_notification_accepted_request( $friendship_id, $initiator_id, $friend_id ) {
-	if ( 'no' == bp_get_user_meta( (int) $initiator_id, 'notification_friends_friendship_accepted', true ) ) {
-		return;
-	}
-
-	$args = array(
-		'tokens' => array(
-			'friend.id'      => $friend_id,
-			'friendship.url' => esc_url( bp_core_get_user_domain( $friend_id ) ),
-			'friend.name'    => bp_core_get_user_displayname( $friend_id ),
-			'friendship.id'  => $friendship_id,
-			'initiator.id'   => $initiator_id,
-		),
-	);
-	bp_send_email( 'friends-request-accepted', $initiator_id, $args );
-}
-add_action( 'friends_friendship_accepted', 'friends_notification_accepted_request', 10, 3 );
-
-/** Notifications *************************************************************/
-
 /**
  * Notification formatting callback for bp-friends notifications.
  *
@@ -182,7 +117,7 @@
  * @since 1.2.0
  */
 function friends_clear_friend_notifications() {
-	if ( isset( $_GET['new'] ) && bp_is_active( 'notifications' ) ) {
+	if ( isset( $_GET['new'] ) ) {
 		bp_notifications_mark_notifications_by_type( bp_loggedin_user_id(), buddypress()->friends->id, 'friendship_accepted' );
 	}
 }
@@ -194,7 +129,7 @@
  * @since 1.9.0
  */
 function bp_friends_mark_friendship_request_notifications_by_type() {
-	if ( isset( $_GET['new'] ) && bp_is_active( 'notifications' ) ) {
+	if ( isset( $_GET['new'] ) ) {
 		bp_notifications_mark_notifications_by_type( bp_loggedin_user_id(), buddypress()->friends->id, 'friendship_request' );
 	}
 }
@@ -206,9 +141,7 @@
  * @since 1.9.0
  */
 function bp_friends_mark_friendship_accepted_notifications_by_type() {
-	if ( bp_is_active( 'notifications' ) ) {
-		bp_notifications_mark_notifications_by_type( bp_loggedin_user_id(), buddypress()->friends->id, 'friendship_accepted' );
-	}
+	bp_notifications_mark_notifications_by_type( bp_loggedin_user_id(), buddypress()->friends->id, 'friendship_accepted' );
 }
 add_action( 'friends_screen_my_friends', 'bp_friends_mark_friendship_accepted_notifications_by_type' );
 
@@ -222,17 +155,15 @@
  * @param int $friend_user_id    The friendship request receiver user ID.
  */
 function bp_friends_friendship_requested_notification( $friendship_id, $initiator_user_id, $friend_user_id ) {
-	if ( bp_is_active( 'notifications' ) ) {
-		bp_notifications_add_notification( array(
-			'user_id'           => $friend_user_id,
-			'item_id'           => $initiator_user_id,
-			'secondary_item_id' => $friendship_id,
-			'component_name'    => buddypress()->friends->id,
-			'component_action'  => 'friendship_request',
-			'date_notified'     => bp_core_current_time(),
-			'is_new'            => 1,
-		) );
-	}
+	bp_notifications_add_notification( array(
+		'user_id'           => $friend_user_id,
+		'item_id'           => $initiator_user_id,
+		'secondary_item_id' => $friendship_id,
+		'component_name'    => buddypress()->friends->id,
+		'component_action'  => 'friendship_request',
+		'date_notified'     => bp_core_current_time(),
+		'is_new'            => 1,
+	) );
 }
 add_action( 'friends_friendship_requested', 'bp_friends_friendship_requested_notification', 10, 3 );
 
@@ -245,9 +176,7 @@
  * @param object $friendship    Friendship object.
  */
 function bp_friends_mark_friendship_rejected_notifications_by_item_id( $friendship_id, $friendship ) {
-	if ( bp_is_active( 'notifications' ) ) {
-		bp_notifications_mark_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, buddypress()->friends->id, 'friendship_request' );
-	}
+	bp_notifications_mark_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, buddypress()->friends->id, 'friendship_request' );
 }
 add_action( 'friends_friendship_rejected', 'bp_friends_mark_friendship_rejected_notifications_by_item_id', 10, 2 );
 
@@ -261,12 +190,6 @@
  * @param int $friend_user_id    The friendship request receiver user ID.
  */
 function bp_friends_add_friendship_accepted_notification( $friendship_id, $initiator_user_id, $friend_user_id ) {
-
-	// Bail if notifications is not active.
-	if ( ! bp_is_active( 'notifications' ) ) {
-		return;
-	}
-
 	// Remove the friend request notice.
 	bp_notifications_mark_notifications_by_item_id( $friend_user_id, $initiator_user_id, buddypress()->friends->id, 'friendship_request' );
 
@@ -292,9 +215,7 @@
  * @param object $friendship    Friendship Object.
  */
 function bp_friends_mark_friendship_withdrawn_notifications_by_item_id( $friendship_id, $friendship ) {
-	if ( bp_is_active( 'notifications' ) ) {
-		bp_notifications_delete_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, buddypress()->friends->id, 'friendship_request' );
-	}
+	bp_notifications_delete_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, buddypress()->friends->id, 'friendship_request' );
 }
 add_action( 'friends_friendship_withdrawn', 'bp_friends_mark_friendship_withdrawn_notifications_by_item_id', 10, 2 );
 
@@ -306,8 +227,6 @@
  * @param int $user_id ID of the user whose notifications are removed.
  */
 function bp_friends_remove_notifications_data( $user_id = 0 ) {
-	if ( bp_is_active( 'notifications' ) ) {
-		bp_notifications_delete_notifications_from_user( $user_id, buddypress()->friends->id, 'friendship_request' );
-	}
+	bp_notifications_delete_notifications_from_user( $user_id, buddypress()->friends->id, 'friendship_request' );
 }
 add_action( 'friends_remove_data', 'bp_friends_remove_notifications_data', 10, 1 );
Index: src/bp-friends/classes/class-bp-friends-component.php
===================================================================
--- src/bp-friends/classes/class-bp-friends-component.php
+++ src/bp-friends/classes/class-bp-friends-component.php
@@ -53,10 +53,14 @@
 			'activity',
 			'template',
 			'functions',
-			'notifications',
 			'widgets',
 		);
 
+		// Conditional includes.
+		if ( bp_is_active( 'notifications' ) ) {
+			$includes[] = 'notifications';
+		}
+
 		if ( ! buddypress()->do_autoload ) {
 			$includes[] = 'classes';
 		}
Index: src/bp-messages/bp-messages-functions.php
===================================================================
--- src/bp-messages/bp-messages-functions.php
+++ src/bp-messages/bp-messages-functions.php
@@ -524,3 +524,78 @@
 
 	return $retval;
 }
+
+/** Email *********************************************************************/
+
+/**
+ * Email message recipients to alert them of a new unread private message.
+ *
+ * @since 1.0.0
+ *
+ * @param array|BP_Messages_Message $raw_args {
+ *     Array of arguments. Also accepts a BP_Messages_Message object.
+ *     @type array  $recipients    User IDs of recipients.
+ *     @type string $email_subject Subject line of message.
+ *     @type string $email_content Content of message.
+ *     @type int    $sender_id     User ID of sender.
+ * }
+ */
+function messages_notification_new_message( $raw_args = array() ) {
+	if ( is_object( $raw_args ) ) {
+		$args = (array) $raw_args;
+	} else {
+		$args = $raw_args;
+	}
+
+	// These should be extracted below.
+	$recipients    = array();
+	$email_subject = $email_content = '';
+	$sender_id     = 0;
+
+	// Barf.
+	extract( $args );
+
+	if ( empty( $recipients ) ) {
+		return;
+	}
+
+	$sender_name = bp_core_get_user_displayname( $sender_id );
+
+	// Send an email to each recipient.
+	foreach ( $recipients as $recipient ) {
+		if ( $sender_id == $recipient->user_id || 'no' == bp_get_user_meta( $recipient->user_id, 'notification_messages_new_message', true ) ) {
+			continue;
+		}
+
+		// User data and links.
+		$ud = get_userdata( $recipient->user_id );
+		if ( empty( $ud ) ) {
+			continue;
+		}
+
+		$args = array(
+			'tokens' => array(
+				'usermessage' => wp_strip_all_tags( stripslashes( $message ) ),
+				'message.url' => esc_url( bp_core_get_user_domain( $recipient->user_id ) . bp_get_messages_slug() . '/view/' . $thread_id . '/' ),
+				'sender.name' => $sender_name,
+				'usersubject' => sanitize_text_field( stripslashes( $subject ) ),
+			),
+		);
+		bp_send_email( 'messages-unread', $ud, $args );
+	}
+
+	/**
+	 * Fires after the sending of a new message email notification.
+	 *
+	 * @since 1.5.0
+	 * @deprecated 2.5.0 Use the filters in BP_Email.
+	 *                   $email_subject and $email_content arguments unset and deprecated.
+	 *
+	 * @param array  $recipients    User IDs of recipients.
+	 * @param string $email_subject Deprecated in 2.5; now an empty string.
+	 * @param string $email_content Deprecated in 2.5; now an empty string.
+	 * @param array  $args          Array of originally provided arguments.
+	 */
+	do_action( 'bp_messages_sent_notification_email', $recipients, '', '', $args );
+}
+add_action( 'messages_message_sent', 'messages_notification_new_message', 10 );
\ No newline at end of file
Index: src/bp-messages/bp-messages-notifications.php
===================================================================
--- src/bp-messages/bp-messages-notifications.php
+++ src/bp-messages/bp-messages-notifications.php
@@ -10,83 +10,6 @@
 // Exit if accessed directly.
 defined( 'ABSPATH' ) || exit;
 
-/** Email *********************************************************************/
-
-/**
- * Email message recipients to alert them of a new unread private message.
- *
- * @since 1.0.0
- *
- * @param array|BP_Messages_Message $raw_args {
- *     Array of arguments. Also accepts a BP_Messages_Message object.
- *     @type array  $recipients    User IDs of recipients.
- *     @type string $email_subject Subject line of message.
- *     @type string $email_content Content of message.
- *     @type int    $sender_id     User ID of sender.
- * }
- */
-function messages_notification_new_message( $raw_args = array() ) {
-	if ( is_object( $raw_args ) ) {
-		$args = (array) $raw_args;
-	} else {
-		$args = $raw_args;
-	}
-
-	// These should be extracted below.
-	$recipients    = array();
-	$email_subject = $email_content = '';
-	$sender_id     = 0;
-
-	// Barf.
-	extract( $args );
-
-	if ( empty( $recipients ) ) {
-		return;
-	}
-
-	$sender_name = bp_core_get_user_displayname( $sender_id );
-
-	// Send an email to each recipient.
-	foreach ( $recipients as $recipient ) {
-		if ( $sender_id == $recipient->user_id || 'no' == bp_get_user_meta( $recipient->user_id, 'notification_messages_new_message', true ) ) {
-			continue;
-		}
-
-		// User data and links.
-		$ud = get_userdata( $recipient->user_id );
-		if ( empty( $ud ) ) {
-			continue;
-		}
-
-		$args = array(
-			'tokens' => array(
-				'usermessage' => wp_strip_all_tags( stripslashes( $message ) ),
-				'message.url' => esc_url( bp_core_get_user_domain( $recipient->user_id ) . bp_get_messages_slug() . '/view/' . $thread_id . '/' ),
-				'sender.name' => $sender_name,
-				'usersubject' => sanitize_text_field( stripslashes( $subject ) ),
-			),
-		);
-		bp_send_email( 'messages-unread', $ud, $args );
-	}
-
-	/**
-	 * Fires after the sending of a new message email notification.
-	 *
-	 * @since 1.5.0
-	 * @deprecated 2.5.0 Use the filters in BP_Email.
-	 *                   $email_subject and $email_content arguments unset and deprecated.
-	 *
-	 * @param array  $recipients    User IDs of recipients.
-	 * @param string $email_subject Deprecated in 2.5; now an empty string.
-	 * @param string $email_content Deprecated in 2.5; now an empty string.
-	 * @param array  $args          Array of originally provided arguments.
-	 */
-	do_action( 'bp_messages_sent_notification_email', $recipients, '', '', $args );
-}
-add_action( 'messages_message_sent', 'messages_notification_new_message', 10 );
-
-/** Notifications *************************************************************/
-
 /**
  * Format notifications for the Messages component.
  *
@@ -224,7 +147,7 @@
  * @param BP_Messages_Message $message Message object.
  */
 function bp_messages_message_sent_add_notification( $message ) {
-	if ( bp_is_active( 'notifications' ) && ! empty( $message->recipients ) ) {
+	if ( ! empty( $message->recipients ) ) {
 		foreach ( (array) $message->recipients as $recipient ) {
 			bp_notifications_add_notification( array(
 				'user_id'           => $recipient->user_id,
@@ -246,30 +169,28 @@
  * @since 1.9.0
  */
 function bp_messages_screen_conversation_mark_notifications() {
-	if ( bp_is_active( 'notifications' ) ) {
-		global $thread_template;
-
-		// Get unread PM notifications for the user.
-		$new_pm_notifications = BP_Notifications_Notification::get( array(
-			'user_id'           => bp_loggedin_user_id(),
-			'component_name'    => buddypress()->messages->id,
-			'component_action'  => 'new_message',
-			'is_new'            => 1,
-		) );
-		$unread_message_ids = wp_list_pluck( $new_pm_notifications, 'item_id' );
-
-		// No unread PMs, so stop!
-		if ( empty( $unread_message_ids ) ) {
-			return;
-		}
+	global $thread_template;
+
+	// Get unread PM notifications for the user.
+	$new_pm_notifications = BP_Notifications_Notification::get( array(
+		'user_id'           => bp_loggedin_user_id(),
+		'component_name'    => buddypress()->messages->id,
+		'component_action'  => 'new_message',
+		'is_new'            => 1,
+	) );
+	$unread_message_ids = wp_list_pluck( $new_pm_notifications, 'item_id' );
+
+	// No unread PMs, so stop!
+	if ( empty( $unread_message_ids ) ) {
+		return;
+	}
 
-		// Get the unread message ids for this thread only.
-		$message_ids = array_intersect( $unread_message_ids, wp_list_pluck( $thread_template->thread->messages, 'id' ) );
+	// Get the unread message ids for this thread only.
+	$message_ids = array_intersect( $unread_message_ids, wp_list_pluck( $thread_template->thread->messages, 'id' ) );
 
-		// Mark each notification for each PM message as read.
-		foreach ( $message_ids as $message_id ) {
-			bp_notifications_mark_notifications_by_item_id( bp_loggedin_user_id(), (int) $message_id, buddypress()->messages->id, 'new_message' );
-		}
+	// Mark each notification for each PM message as read.
+	foreach ( $message_ids as $message_id ) {
+		bp_notifications_mark_notifications_by_item_id( bp_loggedin_user_id(), (int) $message_id, buddypress()->messages->id, 'new_message' );
 	}
 }
 add_action( 'thread_loop_start', 'bp_messages_screen_conversation_mark_notifications', 10 );
@@ -283,10 +204,6 @@
  * @param array $message_ids IDs of the messages.
  */
 function bp_messages_message_delete_notifications( $thread_id, $message_ids ) {
-	if ( ! bp_is_active( 'notifications' ) ) {
-		return;
-	}
-
 	// For each recipient, delete notifications corresponding to each message.
 	$thread = new BP_Messages_Thread( $thread_id );
 	foreach ( $thread->get_recipients() as $recipient ) {
Index: src/bp-messages/classes/class-bp-messages-component.php
===================================================================
--- src/bp-messages/classes/class-bp-messages-component.php
+++ src/bp-messages/classes/class-bp-messages-component.php
@@ -63,7 +63,6 @@
 			'filters',
 			'template',
 			'functions',
-			'notifications',
 			'widgets',
 		);
 
@@ -72,6 +71,9 @@
 		}
 
 		// Conditional includes.
+		if ( bp_is_active( 'notifications' ) ) {
+			$includes[] = 'notifications';
+		}
 		if ( bp_is_active( $this->id, 'star' ) ) {
 			$includes[] = 'star';
 		}
